diff options
| author | David Aspinall | 2009-09-15 08:22:54 +0000 |
|---|---|---|
| committer | David Aspinall | 2009-09-15 08:22:54 +0000 |
| commit | eeb920d350d9c17a0c6a2afca401ef7bb01952a8 (patch) | |
| tree | d6c39be6040d784568a830be6da3e87faa92f8fd | |
| parent | 4412031fbd8b3f4390a2b5e22a0be8cde8f706b9 (diff) | |
When calling proof-script-preprocess, fix starting position.
proof-assert-electric-terminator: restore expected behaviour with/without term.
| -rw-r--r-- | generic/proof-script.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/generic/proof-script.el b/generic/proof-script.el index 9db446d0..9ba6b46f 100644 --- a/generic/proof-script.el +++ b/generic/proof-script.el @@ -1967,7 +1967,9 @@ each queue item." (funcall proof-script-preprocess file ;; ignore spaces at start of command - (+ start (string-match "[^\t\n ]" cmd)) + (+ start (save-excursion + (goto-char start) + (skip-chars-forward " \t\n"))) end cmd) (list cmd)))) @@ -2037,12 +2039,11 @@ comment, and insert or skip to the next semi)." (error "There's nothing to do!")) (skip-chars-backward " \t\n") (if (not (= (char-after (point)) proof-terminal-char)) - (progn - (forward-char) ;; immediately after command end. - (unless proof-electric-terminator-noterminator - (insert proof-terminal-string) - (setq ins t)))) - (let* ((pos (point)) + (unless proof-electric-terminator-noterminator + (insert proof-terminal-string) + (setq ins t))) + (let* ((pos + (if proof-electric-terminator-noterminator (1- (point)) (point))) (semis (save-excursion (proof-segment-up-to-using-cache pos)))) |
