diff options
| author | David Aspinall | 2009-09-06 15:55:21 +0000 |
|---|---|---|
| committer | David Aspinall | 2009-09-06 15:55:21 +0000 |
| commit | 35742816599bca7238f71384b8eb3affc5391456 (patch) | |
| tree | 75de70a8e232168421e9aec964cb84447e62a64e /generic | |
| parent | cef992060b8b78e85c8aaa79278bd443d8403508 (diff) | |
Rearrange some of point movement code for following scripting.
Diffstat (limited to 'generic')
| -rw-r--r-- | generic/pg-user.el | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/generic/pg-user.el b/generic/pg-user.el index edd84ffc..34afcf0e 100644 --- a/generic/pg-user.el +++ b/generic/pg-user.el @@ -90,15 +90,14 @@ Assumes script buffer is current." (if proof-follow-mode (let ((dest (or pos (proof-queue-or-locked-end)))) (cond + ((eq proof-follow-mode 'locked) + (goto-char dest) + (or pos (proof-script-next-command-advance))) ((eq proof-follow-mode 'follow) (unless (pos-visible-in-window-p dest) (let ((win (get-buffer-window (current-buffer) t))) (if win (set-window-point win dest))))) - ((eq proof-follow-mode 'locked) - (if pos - (goto-char dest) - (proof-script-next-command-advance))) ((and (eq proof-follow-mode 'followdown) (> dest (point))) (goto-char dest)))))) @@ -126,15 +125,15 @@ appropriate." "Process until the end of the next unprocessed command after point. If inside a comment, just process until the start of the comment." (interactive) - (proof-with-script-buffer ; for toolbar/other buffers - (goto-char (proof-queue-or-locked-end)) - (skip-chars-forward " \t\n") - (forward-char 1) - (proof-assert-until-point) - (goto-char (proof-queue-or-locked-end)) + (proof-with-script-buffer ; for toolbar/other buffers + (save-excursion + (goto-char (proof-queue-or-locked-end)) + (skip-chars-forward " \t\n") + (proof-assert-until-point)) + (proof-maybe-follow-locked-end) (proof-script-next-command-advance))) -;; NB: "interactive" variant merely for simple docstring. +;; NB: "interactive" variant merely for a simple docstring. (defun proof-assert-until-point-interactive () "Process the region from the end of the locked-region until point. If inside a comment, just process until the start of the comment." |
