GNU bug report logs -
#67034
30.0.50; Make `derived-mode-p` take a single arg
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Fri, 10 Nov 2023 04:00:02 UTC
Severity: normal
Found in version 30.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Thu, 16 Nov 2023 17:28:24 -0500
> From: Stefan Monnier via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> -@defun derived-mode-p &rest modes
> +@defun derived-mode-p modes
> This function returns non-@code{nil} if the current major mode is
> derived from any of the major modes given by the symbols @var{modes}.
> +Instead of a list, @var{modes} can also be a single symbol.
If MODES is supposed to be a list, then why does the first sentence
say "given by the symbols MODES"? It should probably say "given by
the list of symbols in MODES" instead, right?
And the last sentence would be a tad less confusing if it said
Instead of a list, @var{modes} can also be a single mode symbol.
> -(defun provided-mode-derived-p (mode &rest modes)
> +(defun provided-mode-derived-p (mode &optional modes &rest old-modes)
> "Non-nil if MODE is derived from one of MODES.
This should IMO say
Non-nil if MODE is derived from a mode that is a member of the list MODES.
> +(defun derived-mode-p (&optional modes &rest old-modes)
> + "Non-nil if the current major mode is derived from one of MODES.
Likewise here.
Thanks.
This bug report was last modified 1 year and 182 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.