bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46889: Help version guesser bug (was: bug#46889: cperl-mode: Fix ind


From: Stephen Berman
Subject: bug#46889: Help version guesser bug (was: bug#46889: cperl-mode: Fix indentation issues [PATCH])
Date: Fri, 05 Mar 2021 11:30:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Thu, 04 Mar 2021 19:16:29 +0100 Lars Ingebrigtsen <larsi@gnus.org> wrote:

> Mattias Engdegård <mattiase@acm.org> writes:
>
>> `rx-define` is new in Emacs 27, and the patch was apparently intended
>> to work with 26.1.
>
> I was fooled by the version guesser:
>
> ---
> rx-define is an autoloaded Lisp macro in ‘rx.el’.
>
> (rx-define NAME [(ARGS...)] RX)
>
>   Probably introduced at or before Emacs version 24.
> ---
>
> I wonder where that is coming from...  rx-define isn't mentioned in
> NEWS.24?

It's because help-fns--first-release finds this line in NEWS.27:

** Further functions and variables obsolete since Emacs 24 have been removed:

On the assumption that in the NEWS files a first-level outline header
contains the relevant reference to the first release and doesn't contain
a reference to an earlier release, the following patch fixes the bug:

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 290bebf7e5..01d3756bf0 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -668,7 +668,7 @@ help-fns--first-release
               ;; 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))

Steve Berman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]