GNU bug report logs -
#79128
31.0.50; shortdoc doesn't always display the correct arglist
Previous Next
Full log
View this message in rfc822 format
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: 79128 <at> debbugs.gnu.org
> Date: Fri, 01 Aug 2025 09:56:13 +0200
>
> >>>>> On Fri, 01 Aug 2025 10:43:24 +0300, Eli Zaretskii <eliz <at> gnu.org> said:
>
> Eli> Sorry, I'm confused wrt what is the bug/issue you are reporting here.
> Eli> Are you saying that shortdoc is wrong in what it says? If so, please
> Eli> elaborate why, because I see nothing wrong with what it says, given
> Eli> that shortdoc is supposed to be, well, short.
>
> Shortdoc:
>
> >> (seq-empty-p arg &rest args)
>
> C-h f
>
> >> (seq-empty-p SEQUENCE)
>
>
> The shortdoc implies that this is legal:
>
> (seq-empty-p '() '())
>
> but it gives:
>
> Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 1) 2)
> #f(compiled-function (list) "Optimized implementation of `seq-empty-p' for lists." #<bytecode -0x155616500a964cb3>)(nil nil)
Ah, okay. It would be helpful to know this from the get-go.
To answer your question:
> I imagine this is some interaction between `cl-defgeneric' with an
> implementation body, `cl-defmethod', and `help-function-arglist' (other
> functions in the 'sequence group are also affected). C-h f gets it
> right, but I couldnʼt find a simple function in help-fns.el to get me
> the actual arglist.
The function used by "C-h f" to DTRT is help-fns--signature. AFAICT,
in this case it basically ignores what help-function-arglist returns,
and uses the car of what help-split-fundoc returns:
(let* ((use (cond
((and usage (not (listp advertised))) (car usage)) <<<<<<
At this point, I'll step aside and leave it to Stefan and others to
explain how to solve this.
This bug report was last modified 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.