aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2002-06-19 00:30:53 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2002-06-19 00:30:53 +0000
commitbd14d41b8f8cba2d0c99e5fabbbad1623a6c6c41 (patch)
tree36cd8cd56a424823bf51283497a25994eb3653d7 /generic
parentf652439d60110cf171b16f2348edbe988199a92c (diff)
Add proof-shell-last-prompt.
Diffstat (limited to 'generic')
-rw-r--r--generic/proof-shell.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/generic/proof-shell.el b/generic/proof-shell.el
index e2d35e32..f22ff1e1 100644
--- a/generic/proof-shell.el
+++ b/generic/proof-shell.el
@@ -402,6 +402,7 @@ exited by hand (or exits by itself)."
proof-shell-silent nil
proof-shell-last-output nil
proof-shell-last-output-kind nil
+ proof-shell-last-prompt nil
proof-shell-delayed-output nil
proof-shell-delayed-output-kind nil))
@@ -585,6 +586,11 @@ user types by hand."
;; when the end of the queue is reached or an error or interrupt
;; occurs.
+;; A raw record of the last prompt from the proof system
+(defvar proof-shell-last-prompt nil
+ "A record of the last prompt seen from the proof system.
+This is the string matched by proof-shell-annotated-prompt-regexp.")
+
;; A raw record of the last output from the proof system
(defvar proof-shell-last-output nil
"A record of the last string seen from the proof system.")
@@ -1713,6 +1719,8 @@ however, are always processed; hence their name)."
(if (re-search-forward
proof-shell-annotated-prompt-regexp nil t)
(progn
+ (setq proof-shell-last-prompt
+ (buffer-substring (match-beginning 0) (match-end 0)))
(backward-char (- (match-end 0) (match-beginning 0)))
;; NB: decoding x-symbols here is perhaps a bit
;; expensive; moreover it leads to problems