aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generic/proof-script.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/proof-script.el b/generic/proof-script.el
index 8c5421c2..b6a539eb 100644
--- a/generic/proof-script.el
+++ b/generic/proof-script.el
@@ -1601,11 +1601,16 @@ to the function which parses the script segment by segment."
(let (foundend)
;; Find end of command
(while (and (setq foundend
- (re-search-forward proof-script-command-end-regexp nil t))
+ (progn
+ (and
+ (re-search-forward proof-script-command-end-regexp nil t)
+ (or (match-beginning 1) ;; optional start of white space
+ (match-end 0)))))
(proof-buffer-syntactic-context))
;; inside a string or comment before the command end
)
- (if (and foundend
+ (if (and foundend
+ (goto-char foundend) ; move to command end
(not (proof-buffer-syntactic-context)))
;; Found command end outside string/comment
'cmd