branch: externals/bnf-mode
commit 65bfadc9534f7a64e79ea504a15f1c0afe3c6380
Author: Serghei Iakovlev <[email protected]>
Commit: Serghei Iakovlev <[email protected]>
Fixed orthodox comments regexp
---
bnf-mode.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/bnf-mode.el b/bnf-mode.el
index 0637dfa..a16739f 100644
--- a/bnf-mode.el
+++ b/bnf-mode.el
@@ -234,11 +234,10 @@ Currently handled:
(defconst bnf--bnf-syntax-propertize-macro
(syntax-propertize-rules
-
("\\(?:begin\\_>\\|;\\)\\(?:$\\|\\s-\\|\n\\)+\\(\\(?:comment\\_>\\)[^;]*;\\)"
- (1 "<")))
+ ("\\(?:begin\\s-+\\|;\\s-*\\)\\(comment\\)\\(;\\|\\s-+[^;]*;\\)" (1 "<")))
"Fontify comments in ALGOL 60 style.
Provide a macro to apply syntax table properties to comments in ALGOL 60 style.
-Will used only if `bnf-mode-algol-commets-style' is set to t")
+Will be used only if `bnf-mode-algol-commets-style' is set to t")
;;;###autoload
(define-derived-mode bnf-mode prog-mode "BNF"
@@ -252,7 +251,7 @@ Will used only if `bnf-mode-algol-commets-style' is set to
t")
(progn
(setq-local comment-start "; comment ")
(setq-local comment-end ";")
- (setq-local comment-start-skip "\\(?:\\(\\W\\|^\\)comment\\_>\\)\\s-+")
+ (setq-local comment-start-skip "\\(?:\\(\\W\\|^\\)comment\\)\\s-+")
(setq-local syntax-propertize-function
bnf--bnf-syntax-propertize-macro))
(progn