[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode 4f7f855 4/9: Apply changes from ELPA
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode 4f7f855 4/9: Apply changes from ELPA |
Date: |
Tue, 14 May 2019 08:49:43 -0400 (EDT) |
branch: externals/bnf-mode
commit 4f7f8555e5c686666eae235953f988df22f589e2
Author: Serghei Iakovlev <address@hidden>
Commit: Serghei Iakovlev <address@hidden>
Apply changes from ELPA
---
bnf-mode.el | 40 ++++++++++++++++------------------------
1 file changed, 16 insertions(+), 24 deletions(-)
diff --git a/bnf-mode.el b/bnf-mode.el
index 35b0fa4..2398868 100644
--- a/bnf-mode.el
+++ b/bnf-mode.el
@@ -1,6 +1,6 @@
;;; bnf-mode.el --- Major mode for editing BNF grammars. -*- lexical-binding:
t; -*-
-;; Copyright (C) 2019 Serghei Iakovlev
+;; Copyright (C) 2019 Free Software Foundation, Inc
;; Author: Serghei Iakovlev <address@hidden>
;; Maintainer: Serghei Iakovlev
@@ -11,7 +11,7 @@
;; This file is NOT part of GNU Emacs.
-;;; License
+;;;; License
;; This file is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
@@ -24,9 +24,7 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with this file; if not, write to the Free Software
-;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-;; 02110-1301, USA.
+;; along with this file. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@@ -64,8 +62,6 @@
(eval-when-compile
(require 'rx)) ; `rx'
-(require 'cl-lib) ; `cl-defmacro'
-
;;; Customization
@@ -78,12 +74,6 @@
:link '(url-link :tag "GitHub Page" "https://github.com/sergeyklay/bnf-mode")
:link '(emacs-commentary-link :tag "Commentary" "bnf-mode"))
-(defcustom bnf-mode-hook nil
- "List of functions to call when entering BNF Mode."
- :tag "Hook"
- :type 'hook
- :group 'bnf)
-
(defcustom bnf-mode-algol-comments-style nil
"Non-nil means use for BNF comments style introduced in ALGOL 60.
@@ -99,7 +89,6 @@ following \"comment\" conventions will hold:
Note: Enabling this feature will disable comments recognition which use
semicolon only (\";\")."
- :group 'bnf
:type 'boolean)
@@ -110,11 +99,11 @@ semicolon only (\";\")."
`((bnf-rule-name . ,(rx (and
(1+ (or alnum digit))
(0+ (or alnum digit
- (in
"!\"\#$%&'()*+,\-./:;address@hidden|}~")
+ (in "!\"#$%&'()*+,-./:;address@hidden|}~")
(in " \t"))))))
"Additional special sexps for `bnf-rx'."))
- (cl-defmacro bnf-rx (&rest sexps)
+ (defmacro bnf-rx (&rest sexps)
"BNF-specific replacement for `rx'.
In addition to the standard forms of `rx', the following forms
@@ -128,12 +117,10 @@ are available:
See `rx' documentation for more information about REGEXPS param."
(let ((rx-constituents (append bnf-rx-constituents rx-constituents)))
- (cond ((null sexps)
- (error "No regexp"))
- ((cdr sexps)
- (rx-to-string `(and ,@sexps) t))
- (t
- (rx-to-string (car sexps) t))))))
+ (rx-to-string (cond ((null sexps) (error "No regexp"))
+ ((cdr sexps) `(and ,@sexps))
+ (t (car sexps)))
+ t))))))
;;; Font Locking
@@ -177,8 +164,14 @@ See `rx' documentation for more information about REGEXPS
param."
(defvar bnf-mode-syntax-table
(let ((table (make-syntax-table)))
;; Give CR the same syntax as newline
+ ;; FIXME: Why?
(modify-syntax-entry ?\^m "> b" table)
+ ;; FIXME: "_" doesn't mean "symbol" but "symbol constituent".
+ ;; I.e. the settings below mean that Emacs will consider "a:b=(c" as one
+ ;; symbol (aka "identifier") which can be seen if you try to C-M-f and
+ ;; C-M-b to move by sexps.
+
;; Treat ::= as sequence of symbols
(modify-syntax-entry ?\: "_" table)
(modify-syntax-entry ?\= "_" table)
@@ -229,7 +222,6 @@ Will be used only if `bnf-mode-algol-comments-style' is set
to t")
(define-derived-mode bnf-mode prog-mode "BNF"
"A major mode for editing BNF grammars."
:syntax-table bnf-mode-syntax-table
- :group 'bnf-mode
;; Comments setup
(setq-local comment-use-syntax nil)
@@ -251,7 +243,7 @@ Will be used only if `bnf-mode-algol-comments-style' is set
to t")
bnf-font-lock-keywords
;; keywords-only
nil
- ;; Regarding to RFC5234 rule names are case insensitive.
+ ;; According to RFC5234 rule names are case insensitive.
;; The names <rulename>, <Rulename>, <RULENAME>, and <rUlENamE>
;; all refer to the same rule. As far as is known, this doesn't
;; conflict with original BNF version
- [elpa] externals/bnf-mode updated (e83db96 -> a1f2a93), Stefan Monnier, 2019/05/14
- [elpa] externals/bnf-mode f7c76e9 1/9: Correct change log (remove extra entry), Stefan Monnier, 2019/05/14
- [elpa] externals/bnf-mode 7861f1b 2/9: Fix copyright of test files, Stefan Monnier, 2019/05/14
- [elpa] externals/bnf-mode 4f7f855 4/9: Apply changes from ELPA,
Stefan Monnier <=
- [elpa] externals/bnf-mode 1750c8f 3/9: Add bnf-mofe-autoloads.el to git ignore, Stefan Monnier, 2019/05/14
- [elpa] externals/bnf-mode 2f217ec 8/9: Bump version, Stefan Monnier, 2019/05/14
- [elpa] externals/bnf-mode 274d6b5 6/9: The Maintainer: should be a valid email address, Stefan Monnier, 2019/05/14
- [elpa] externals/bnf-mode 81ecc08 7/9: Update documentation, Stefan Monnier, 2019/05/14
- [elpa] externals/bnf-mode a1f2a93 9/9: Merge remote-tracking branch 'bnf-mode/master' into externals/bnf-mode, Stefan Monnier, 2019/05/14
- [elpa] externals/bnf-mode 2662166 5/9: Fix typo, Stefan Monnier, 2019/05/14