From 57758dcbac02d3477de7f1e30d3c53a9e647b9f3 Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Fri, 5 Mar 2021 14:08:17 +0100 Subject: [PATCH] Restrict the version guesser to top-level headings * lisp/help-fns.el (help-fns--first-release): Restrict the version guesser to top-level section -- looking in all headings leads to false positives (bug#46889). --- lisp/help-fns.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 290bebf7e5f..01d3756bf0c 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -668,7 +668,7 @@ FILE is the file where FUNCTION was probably defined." ;; Almost all entries are of the form "* ... in Emacs NN.MM." ;; but there are also a few in the form "* Emacs NN.MM is a bug ;; fix release ...". - (if (not (re-search-backward "^\\*.* Emacs \\([0-9.]+[0-9]\\)" + (if (not (re-search-backward "^\\* .* Emacs \\([0-9.]+[0-9]\\)" nil t)) (message "Ref found in non-versioned section in %S" (file-name-nondirectory f)) -- 2.39.2