[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode 7bbf329 49/74: Added comment-start-skip to hel
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode 7bbf329 49/74: Added comment-start-skip to help comment commands recognize comments |
Date: |
Thu, 9 May 2019 08:27:51 -0400 (EDT) |
branch: externals/bnf-mode
commit 7bbf32931b2f93401e919a6aa19499a7b530599c
Author: Serghei Iakovlev <address@hidden>
Commit: Serghei Iakovlev <address@hidden>
Added comment-start-skip to help comment commands recognize comments
---
CHANGELOG.org | 3 +++
bnf-mode.el | 5 +++--
test/bnf-mode-font-test.el | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.org b/CHANGELOG.org
index 5b50aec..07c06f0 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -6,6 +6,9 @@ All notable changes to this project will be documented in this
file.
The format is based on [[http://keepachangelog.com][Keep a Changelog]] and
this project adheres to [[http://semver.org][Semantic Versioning]].
** [[https://github.com/sergeyklay/bnf-mode/compare/0.3.2...HEAD][Unreleased]]
+*** Added
+- Added =comment-start-skip= to help comment commands recognize comments
+
*** Changed
- Return back =comment-start= and =comment-end= removed in
[[https://github.com/sergeyklay/bnf-mode/commit/83f0e0fc144e453bcce459d2d655a7b48e77953e][83f0e0f]]
diff --git a/bnf-mode.el b/bnf-mode.el
index edf36b2..232b6c4 100644
--- a/bnf-mode.el
+++ b/bnf-mode.el
@@ -168,11 +168,11 @@ See `rx' documentation for more information about REGEXPS
param."
(modify-syntax-entry ?\= "_" table)
;; Treat | as a symbol
(modify-syntax-entry ?\| "_" table)
- ;; In the BNF there are no strings
+ ;; In BNF there are no strings
;; so treat ' and " as a symbols
(modify-syntax-entry ?\" "_" table)
(modify-syntax-entry ?\' "_" table)
- ;; In the BNF there are no grouping
+ ;; In BNF there are no grouping
;; brackets except angle ones
(modify-syntax-entry ?\( "_" table)
(modify-syntax-entry ?\) "_" table)
@@ -195,6 +195,7 @@ See `rx' documentation for more information about REGEXPS
param."
(setq-local comment-use-syntax nil)
(setq-local comment-start "; ")
(setq-local comment-end "")
+ (setq-local comment-start-skip "\\(?:\\(\\W\\|^\\);+\\)\\s-*")
;; Font locking
(setq font-lock-defaults
'(
diff --git a/test/bnf-mode-font-test.el b/test/bnf-mode-font-test.el
index 18335d7..ff4aa09 100644
--- a/test/bnf-mode-font-test.el
+++ b/test/bnf-mode-font-test.el
@@ -49,7 +49,7 @@
(bnf-test-with-temp-buffer "; A
<stm> ::= <decl> ; foo"
- (should (eq (bnf-test-face-at 1)
'font-lock-comment-face))
+ (should (eq (bnf-test-face-at 1)
'font-lock-comment-delimiter-face))
(should (eq (bnf-test-face-at 3)
'font-lock-comment-face))
(should-not (bnf-test-face-at 5))
(should (eq (bnf-test-face-at 24)
'font-lock-comment-face))))
- [elpa] externals/bnf-mode aa2c7a2 30/74: Correct change log formatting [ci skip], (continued)
- [elpa] externals/bnf-mode aa2c7a2 30/74: Correct change log formatting [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode c90b14d 26/74: Correct documentation to follow code style guide., Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode a3a77e3 29/74: In the BNF there are no grouping brackets except angle ones. Fixed, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 1698dc8 39/74: Improved documentation, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 64a32ba 42/74: Cleaned up Makefile, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode a53ade1 24/74: Fixed BNF rule name definition to follow ALGOL 60 report, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 65bfadc 65/74: Fixed orthodox comments regexp, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode e2f8bfa 53/74: Added support of ; character to use in terminals, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 3a46f17 36/74: Correct documentation, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f99de60 47/74: Cleaned up Makefile, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 7bbf329 49/74: Added comment-start-skip to help comment commands recognize comments,
Stefan Monnier <=
- [elpa] externals/bnf-mode 00a0543 50/74: Removed not used tests macro, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 6eb06a8 52/74: Make tests easier to read, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 273eabd 31/74: Correct change log formatting (II) [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 687ee9e 16/74: Angle brackets to use for nonterminals are optional. Changed, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 83f0e0f 28/74: Code cleanup, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 96c6e76 61/74: Changed CI deploy token [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 8dabc6c 63/74: Minor correction to the change log format, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode e898672 73/74: Removed no longer needed local variables, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f95ec5f 69/74: Improved preparing package, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 7c98cc9 66/74: Fixed misspelling, updated change log, Stefan Monnier, 2019/05/09