emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/bnf-mode 0bbd059 19/36: Added abbreviation table used i


From: Stefan Monnier
Subject: [elpa] externals/bnf-mode 0bbd059 19/36: Added abbreviation table used in bnf-mode buffers
Date: Wed, 17 Mar 2021 18:40:17 -0400 (EDT)

branch: externals/bnf-mode
commit 0bbd059aa4ed179f42495ad4bee964e78e0830f9
Author: Serghei Iakovlev <egrep@protonmail.ch>
Commit: Serghei Iakovlev <egrep@protonmail.ch>

    Added abbreviation table used in bnf-mode buffers
---
 NEWS        | 1 +
 bnf-mode.el | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 2cc33d1..f431754 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Previously BNF Mode used ert through ert-runner for testing
 purposes.  However, it seems ert-runner is abandoned (the last
 commit a few years ago), it still uses only Emacs 24 on its own
 tests and in general it looks as not maintained anymore project.
+** Added abbreviation table used in bnf-mode buffers
 
 * BNF Mode 0.4.4
 ** Rework documentation and provide Info-file.
diff --git a/bnf-mode.el b/bnf-mode.el
index c04a0ff..f19936f 100644
--- a/bnf-mode.el
+++ b/bnf-mode.el
@@ -68,6 +68,9 @@ Note: enabling this feature will disable comments 
recognition, which
 start with semicolons only (\";\")."
   :type 'boolean)
 
+(defvar bnf-mode-abbrev-table nil
+  "Abbreviation table used in `bnf-mode' buffers.")
+
 
 ;;; Specialized rx
 
@@ -94,7 +97,7 @@ are available:
 
 See `rx' documentation for more information about REGEXPS param."
      (let ((rx-constituents (append bnf-rx-constituents rx-constituents)))
-       (rx-to-string (cond ((null sexps) (error "No regexp"))
+       (rx-to-string (cond ((null sexps) (error "No regexp is provided"))
                            ((cdr sexps)  `(and ,@sexps))
                            (t            (car sexps)))
                      t))))
@@ -203,8 +206,9 @@ style.  Will be used only if 
`bnf-mode-algol-comments-style' is set to t.")
 The variable `bnf-mode-algol-comments-style' can be changed to control
 comments style used in grammars.
 
-Turning on BNF mode calls the value of `prog-mode-hook' and then of
+Turning on BNF Mode calls the value of `prog-mode-hook' and then of
 `bnf-mode-hook', if they are non-nil."
+  :abbrev-table bnf-mode-abbrev-table
   :syntax-table bnf-mode-syntax-table
 
   ;; Comments setup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]