From bd14d41b8f8cba2d0c99e5fabbbad1623a6c6c41 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Wed, 19 Jun 2002 00:30:53 +0000 Subject: Add proof-shell-last-prompt. --- generic/proof-shell.el | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v1.2.3