aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2000-08-29 14:32:53 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2000-08-29 14:32:53 +0000
commit992e695a99fa2adcf966c6c3fb537488f7c5b910 (patch)
tree9fe280ef88957028308bd01106e75aeb55273223 /generic
parent8c167d58b0edbc81aa33c5a0ff7a330a4deba71f (diff)
Added proof-shell-auto-terminate-commands
Diffstat (limited to 'generic')
-rw-r--r--generic/proof-config.el11
-rw-r--r--generic/proof-shell.el5
2 files changed, 14 insertions, 2 deletions
diff --git a/generic/proof-config.el b/generic/proof-config.el
index 4743eac6..758edb5c 100644
--- a/generic/proof-config.el
+++ b/generic/proof-config.el
@@ -1262,7 +1262,7 @@ See also `proof-shell-init-cmd'."
:type '(choice string (const nil))
:group 'proof-shell)
-(defcustom proof-shell-init-cmd ""
+(defcustom proof-shell-init-cmd nil
"The command for initially configuring the proof process.
This command is sent to the process as soon as syncrhonization is gained
(when an annotated prompt is first recognized). It can be used to configure
@@ -1283,6 +1283,15 @@ See also `proof-shell-pre-sync-init-cmd'."
:type '(choice string (const nil))
:group 'proof-shell)
+(defcustom proof-shell-auto-terminate-commands t
+ "Non-nil if Proof General should try to add terminator to every command.
+If non-nil, whenever a command is sent to the prover using
+`proof-shell-invisible-command', Proof General will check to see if it
+ends with proof-terminal-char, and add it if not.
+If proof-terminal-char is nil, this has no effect."
+ :type 'boolean
+ :group 'proof-shell)
+
;; FIXME could add option to quiz user before rude kill.
(defcustom proof-shell-quit-timeout 10
"The number of seconds to wait after sending proof-shell-quit-cmd.
diff --git a/generic/proof-shell.el b/generic/proof-shell.el
index a63cd8c2..c0d1de04 100644
--- a/generic/proof-shell.el
+++ b/generic/proof-shell.el
@@ -1788,12 +1788,15 @@ Calls proof-state-change-hook."
;;;###autoload
(defun proof-shell-invisible-command (cmd &optional wait)
- "Send CMD to the proof process. Automatically add proof-terminal-char if nec.
+ "Send CMD to the proof process.
+Automatically add proof-terminal-char if necessary, examining
+proof-shell-no-auto-terminate-commands.
By default, let the command be processed asynchronously.
But if optional WAIT command is non-nil, wait for processing to finish
before and after sending the command.
If WAIT is an integer, wait for that many seconds afterwards."
(unless (or (null proof-terminal-char)
+ (not proof-shell-auto-terminate-commands)
(string-match (concat
(regexp-quote
(char-to-string proof-terminal-char))