unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#72554: 31.0.50; misleading release information for 'always'
@ 2024-08-10 11:16 Ulrich Mueller
  2024-08-10 11:42 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Mueller @ 2024-08-10 11:16 UTC (permalink / raw)
  To: 72554

"C-h f always RET" says:

   always is a byte-compiled Lisp function in ‘subr.el’.
   [...]

     Probably introduced at or before Emacs version 25.1.
     This function does not change global state, including the match data.

However, 'always' only appeared in Emacs 28, so that information is
misleading when trying to write backwards compatible code.

(It's less of a problem when the version that is shown is greater than
the actual first release, which I think happens more often.)

Not sure how to fix this. Maybe exclude common English words (which
are likely to appear in NEWS* without being the name of a function)
from scanning in help-fns.el?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#72554: 31.0.50; misleading release information for 'always'
  2024-08-10 11:16 bug#72554: 31.0.50; misleading release information for 'always' Ulrich Mueller
@ 2024-08-10 11:42 ` Eli Zaretskii
  2024-08-10 12:07   ` Ulrich Mueller
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-08-10 11:42 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: 72554

> From: Ulrich Mueller <ulm@gentoo.org>
> Date: Sat, 10 Aug 2024 13:16:35 +0200
> 
> "C-h f always RET" says:
> 
>    always is a byte-compiled Lisp function in ‘subr.el’.
>    [...]
> 
>      Probably introduced at or before Emacs version 25.1.
>      This function does not change global state, including the match data.
> 
> However, 'always' only appeared in Emacs 28, so that information is
> misleading when trying to write backwards compatible code.
> 
> (It's less of a problem when the version that is shown is greater than
> the actual first release, which I think happens more often.)
> 
> Not sure how to fix this. Maybe exclude common English words (which
> are likely to appear in NEWS* without being the name of a function)
> from scanning in help-fns.el?

help-fns--first-release-regexp is supposed to find only quoted names,
so the problem is not with common words.  I think it finds this in
NEWS.25:

  *** New value 'always' for 'sh-indent-after-continuation'.
                ^^^^^^^^

So maybe we should reject matches that immediately follow "value" or
"values".  That won't reject all false positives, but it should be an
improvement, I think.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#72554: 31.0.50; misleading release information for 'always'
  2024-08-10 11:42 ` Eli Zaretskii
@ 2024-08-10 12:07   ` Ulrich Mueller
  2024-08-10 12:47     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Mueller @ 2024-08-10 12:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 72554

>>>>> On Sat, 10 Aug 2024, Eli Zaretskii wrote:

> help-fns--first-release-regexp is supposed to find only quoted names,
> so the problem is not with common words.  I think it finds this in
> NEWS.25:

>   *** New value 'always' for 'sh-indent-after-continuation'.
>                 ^^^^^^^^

NEWS.26, too (twice):

  ** Option 'buffer-offer-save' can be set to new value, 'always'.
                                                         ^^^^^^^^
  When set to 'always', the command 'save-some-buffers' will always
              ^^^^^^^^
  offer this buffer for saving.

> So maybe we should reject matches that immediately follow "value" or
> "values".  That won't reject all false positives, but it should be an
> improvement, I think.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#72554: 31.0.50; misleading release information for 'always'
  2024-08-10 12:07   ` Ulrich Mueller
@ 2024-08-10 12:47     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2024-08-10 12:47 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: 72554

> From: Ulrich Mueller <ulm@gentoo.org>
> Cc: 72554@debbugs.gnu.org
> Date: Sat, 10 Aug 2024 14:07:20 +0200
> 
> >>>>> On Sat, 10 Aug 2024, Eli Zaretskii wrote:
> 
> > help-fns--first-release-regexp is supposed to find only quoted names,
> > so the problem is not with common words.  I think it finds this in
> > NEWS.25:
> 
> >   *** New value 'always' for 'sh-indent-after-continuation'.
> >                 ^^^^^^^^
> 
> NEWS.26, too (twice):
> 
>   ** Option 'buffer-offer-save' can be set to new value, 'always'.
>                                                          ^^^^^^^^
>   When set to 'always', the command 'save-some-buffers' will always
>               ^^^^^^^^
>   offer this buffer for saving.
> 
> > So maybe we should reject matches that immediately follow "value" or
> > "values".  That won't reject all false positives, but it should be an
> > improvement, I think.

So we have more prefixes to filter out: "set to" as well.  And some
punctuation between "value" and a quoted symbol should be ignored.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-10 12:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-10 11:16 bug#72554: 31.0.50; misleading release information for 'always' Ulrich Mueller
2024-08-10 11:42 ` Eli Zaretskii
2024-08-10 12:07   ` Ulrich Mueller
2024-08-10 12:47     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).