aboutsummaryrefslogtreecommitdiff
path: root/generic/proof-script.el
diff options
context:
space:
mode:
Diffstat (limited to 'generic/proof-script.el')
-rw-r--r--generic/proof-script.el17
1 files changed, 8 insertions, 9 deletions
diff --git a/generic/proof-script.el b/generic/proof-script.el
index 6d17f002..fe6c07ac 100644
--- a/generic/proof-script.el
+++ b/generic/proof-script.el
@@ -1350,15 +1350,14 @@ to the function which parses the script segment by segment."
(defun proof-script-generic-parse-sexp ()
"Used for proof-script-parse-function if proof-script-sexp-commands is set."
- (skip-chars-forward " \t\n")
- (let* ((parse-sexp-ignore-comments t) ; gobble comments into commands
- (end (scan-sexps (point) 1)))
- (if end
- (progn
- (goto-char end)
- (list 'cmd))
- ;; Didn't find command end
- (list nil))))
+ ;; Usual treatment of comments
+ (if (looking-at proof-comment-start-regexp)
+ ;; Find end of comment
+ (if (proof-script-generic-parse-find-comment-end) 'comment)
+ (let* ((parse-sexp-ignore-comments t) ; gobble comments into commands
+ (end (scan-sexps (point) 1)))
+ (if end
+ (progn (goto-char end) 'cmd)))))
;; NEW parsing functions for 3.2