[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/proof-general 3b5d65d340 4/8: qrhl: Remove comments from w
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/proof-general 3b5d65d340 4/8: qrhl: Remove comments from within multiline commands before sending them to qrhl-tool. |
Date: |
Mon, 28 Nov 2022 07:59:30 -0500 (EST) |
branch: elpa/proof-general
commit 3b5d65d340c74218e758066cad50e2b4433b3b5e
Author: Dominique Unruh <unruh@ut.ee>
Commit: Dominique Unruh <unruh@ut.ee>
qrhl: Remove comments from within multiline commands before sending them to
qrhl-tool.
---
qrhl/qrhl.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/qrhl/qrhl.el b/qrhl/qrhl.el
index 84283387b4..262b2c1633 100644
--- a/qrhl/qrhl.el
+++ b/qrhl/qrhl.el
@@ -43,13 +43,13 @@
(defun qrhl-forward-regex (regex)
"If text starting at point matches REGEX, move to end of the match and
return t.
- Otherwise return nil"
+Otherwise return nil"
(and (looking-at regex) (goto-char (match-end 0)) t))
(defun qrhl-parse-regular-command ()
"Find the period-terminated command starting at point.
- Moves to its end.
- Returns t if this worked."
+Moves to its end.
+Returns t if this worked."
(let ((pos
(save-excursion
(progn
@@ -101,6 +101,11 @@
))
"Font-lock configuration for qRHL proof scripts")
+(defun qrhl-proof-script-preprocess (file start end cmd)
+ "Strips comments from the command CMD.
+Called before sending CMD to the prover."
+ (list (replace-regexp-in-string "\\(?:^\\|[ \t]\\)[ \t]*#.*$" "" cmd)))
+
(proof-easy-config 'qrhl "qRHL"
proof-prog-name qrhl-prog-name
;; We need to give some option here, otherwise `proof-prog-name' is
@@ -132,6 +137,7 @@
proof-response-font-lock-keywords qrhl-font-lock-keywords
font-lock-extra-managed-props '(display)
proof-shell-unicode t
+ proof-script-preprocess #'qrhl-proof-script-preprocess
)
; buttoning functions follow https://superuser.com/a/331896/748969
- [nongnu] elpa/proof-general updated (d1bbf22ed0 -> 8e688a6770), ELPA Syncer, 2022/11/28
- [nongnu] elpa/proof-general 4a020a7121 1/8: qrhl: Improved font-lock mode:, ELPA Syncer, 2022/11/28
- [nongnu] elpa/proof-general c844c00d8c 7/8: qrhl: made `font-lock-extra-managed-props` buffer-local., ELPA Syncer, 2022/11/28
- [nongnu] elpa/proof-general 06e85d8f23 5/8: qrhl: Automatic indentation., ELPA Syncer, 2022/11/28
- [nongnu] elpa/proof-general 8e688a6770 8/8: Merge pull request #675 from dominique-unruh/qrhl-tool-rebased, ELPA Syncer, 2022/11/28
- [nongnu] elpa/proof-general ab7b274597 3/8: qrhl: Removed leftover debug output., ELPA Syncer, 2022/11/28
- [nongnu] elpa/proof-general a2bd550a2a 2/8: qrhl: Added more abbreviations and symbols in input method., ELPA Syncer, 2022/11/28
- [nongnu] elpa/proof-general 3b5d65d340 4/8: qrhl: Remove comments from within multiline commands before sending them to qrhl-tool.,
ELPA Syncer <=
- [nongnu] elpa/proof-general a49cded675 6/8: qrhl: Added more keywords to syntax highlighting:, ELPA Syncer, 2022/11/28