branch: externals/bnf-mode
commit 0bbd059aa4ed179f42495ad4bee964e78e0830f9
Author: Serghei Iakovlev <[email protected]>
Commit: Serghei Iakovlev <[email protected]>
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