From 65ddaaf41ffc2b6f49ddf8a5f689dd24ab0a0a98 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 31 Aug 2021 03:17:21 +0200 Subject: [PATCH] Fix abnf parsing of elements * lisp/progmodes/ebnf-abn.el (ebnf-abn-lex): Make parsing work (bug#39663). --- lisp/progmodes/ebnf-abn.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: =, =/ -- 2.39.2