From: Lars Ingebrigtsen Date: Tue, 31 Aug 2021 01:17:21 +0000 (+0200) Subject: Fix abnf parsing of elements X-Git-Tag: emacs-28.0.90~1250 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=65ddaaf41ffc2b6f49ddf8a5f689dd24ab0a0a98;p=emacs.git Fix abnf parsing of elements * lisp/progmodes/ebnf-abn.el (ebnf-abn-lex): Make parsing work (bug#39663). --- diff --git a/lisp/progmodes/ebnf-abn.el b/lisp/progmodes/ebnf-abn.el index 2a37110f6ae..c3b240ad8be 100644 --- a/lisp/progmodes/ebnf-abn.el +++ b/lisp/progmodes/ebnf-abn.el @@ -530,13 +530,14 @@ See documentation for variable `ebnf-abn-lex'." (let ((prose-p (= (following-char) ?<))) (when prose-p (forward-char) - (or (looking-at ebnf-abn-non-terminal-letter-chars) + (or (looking-at (concat "[" ebnf-abn-non-terminal-letter-chars "]")) (error "Invalid prose value"))) (setq ebnf-abn-lex (ebnf-buffer-substring ebnf-abn-non-terminal-chars)) (when prose-p (or (= (following-char) ?>) (error "Invalid prose value")) + (forward-char) (setq ebnf-abn-lex (concat "<" ebnf-abn-lex ">")))) 'non-terminal) ;; equal: =, =/