From 47c1c7976a6830227edd8e125f6993ae4e15f6a6 Mon Sep 17 00:00:00 2001 From: letouzey Date: Thu, 26 Apr 2012 09:54:13 +0000 Subject: Program: avoid staying in program mode after a failed Program command git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15247 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/flags.ml | 5 +++++ lib/flags.mli | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'lib') diff --git a/lib/flags.ml b/lib/flags.ml index 29e01bac39..2f41c772ab 100644 --- a/lib/flags.ml +++ b/lib/flags.ml @@ -66,6 +66,11 @@ let auto_intros = ref true let make_auto_intros flag = auto_intros := flag let is_auto_intros () = version_strictly_greater V8_2 && !auto_intros +(** [program_cmd] indicates that the current command is a Program one. + [program_mode] tells that Program mode has been activated, either + globally via [Set Program] or locally via the Program command prefix. *) + +let program_cmd = ref false let program_mode = ref false let is_program_mode () = !program_mode diff --git a/lib/flags.mli b/lib/flags.mli index 94c8795d45..b96bd402d4 100644 --- a/lib/flags.mli +++ b/lib/flags.mli @@ -47,6 +47,11 @@ val if_verbose : ('a -> unit) -> 'a -> unit val make_auto_intros : bool -> unit val is_auto_intros : unit -> bool +(** [program_cmd] indicates that the current command is a Program one. + [program_mode] tells that Program mode has been activated, either + globally via [Set Program] or locally via the Program command prefix. *) + +val program_cmd : bool ref val program_mode : bool ref val is_program_mode : unit -> bool -- cgit v1.2.3