aboutsummaryrefslogtreecommitdiff
path: root/generic/proof-toolbar.el
diff options
context:
space:
mode:
authorDavid Aspinall1998-10-12 14:45:23 +0000
committerDavid Aspinall1998-10-12 14:45:23 +0000
commit28e330c9d46cc6bd1cf5b4ea4168ec4fa8aab204 (patch)
tree5f60762d6675a12caf9a3467c75a5a60f10f8400 /generic/proof-toolbar.el
parentec99bfc45a3625a7ca12f501fba3eaf85e964072 (diff)
Made toolbar functions leave point alone, mostly.
Diffstat (limited to 'generic/proof-toolbar.el')
-rw-r--r--generic/proof-toolbar.el24
1 files changed, 18 insertions, 6 deletions
diff --git a/generic/proof-toolbar.el b/generic/proof-toolbar.el
index 4599d6ce..7cdddeb0 100644
--- a/generic/proof-toolbar.el
+++ b/generic/proof-toolbar.el
@@ -192,7 +192,8 @@ without giving error messages."
(defun proof-toolbar-undo ()
"Undo last successful in locked region, without deleting it."
- (proof-undo-last-successful-command t))
+ (save-excursion
+ (proof-undo-last-successful-command t)))
(defun proof-toolbar-next-enable-p ()
;; Could check if there *is* a next command here, to avoid
@@ -200,8 +201,15 @@ without giving error messages."
t)
(defun proof-toolbar-next ()
- "Assert next command in proof to proof process."
- (proof-assert-next-command))
+ "Assert next command in proof to proof process.
+Move point if the end of the locked position is invisible."
+ (save-excursion
+ (if (proof-shell-live-buffer)
+ (goto-char (proof-locked-end))
+ (goto-char (point-min)))
+ (proof-assert-next-command))
+ ;; FIXME: not sure about whether this is nice or not.
+ (proof-goto-end-of-locked-if-pos-not-visible-in-window))
(defun proof-toolbar-retract-enable-p ()
(proof-toolbar-process-available-p))
@@ -209,15 +217,19 @@ without giving error messages."
(defun proof-toolbar-retract ()
"Retract buffer."
;; proof-retract-file might be better here!
- (goto-char (point-min))
- (proof-retract-until-point))
+ (save-excursion
+ (goto-char (point-min))
+ (proof-retract-until-point)))
(defun proof-toolbar-use-enable-p ()
;; Could check to see that whole buffer hasn't been
;; processed already.
t)
-(defalias 'proof-toolbar-use 'proof-process-buffer)
+(defun proof-toolbar-use
+ "Process the whole buffer"
+ (save-excursion
+ (proof-process-buffer)))
(defun proof-toolbar-restart-enable-p ()
;; Could disable this unless there's something running.