From: Stephen Berman Date: Fri, 5 Mar 2021 13:08:17 +0000 (+0100) Subject: Restrict the version guesser to top-level headings X-Git-Tag: emacs-28.0.90~3431 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=57758dcbac02d3477de7f1e30d3c53a9e647b9f3;p=emacs.git 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). --- 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))