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

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

bug#67034: 30.0.50; Make `derived-mode-p` take a single arg


From: Eli Zaretskii
Subject: bug#67034: 30.0.50; Make `derived-mode-p` take a single arg
Date: Fri, 17 Nov 2023 10:24:32 +0200

> 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@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.





reply via email to

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