From 992e695a99fa2adcf966c6c3fb537488f7c5b910 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Tue, 29 Aug 2000 14:32:53 +0000 Subject: Added proof-shell-auto-terminate-commands --- generic/proof-config.el | 11 ++++++++++- generic/proof-shell.el | 5 ++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'generic') 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)) -- cgit v1.2.3