Subject: 31.0.50; shortdoc doesn't always display the correct arglist
From: Robert Pluim <[email-masked]>
To: [email-masked]
Date: Wed, 30 Jul 2025 15:26:08 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

emacs -Q
(require 'shortdoc)
(shortdoc 'sequence)

The entry for e.g. `seq-empty-p' says:

    (seq-empty-p arg &rest args)
      Return non-nil if the SEQUENCE is empty, nil otherwise.
      (seq-empty-p [])
        ⇒ t

But C-h f seq-empty-p says:

    seq-empty-p is a byte-code-function in ‘seq.el’.

    (seq-empty-p SEQUENCE)

    Return non-nil if the SEQUENCE is empty, nil otherwise.

      Other relevant functions are documented in the sequence group.

    This is a generic function.

    Implementations:

    (seq-empty-p (LIST list)) in ‘seq.el’.

    Optimized implementation of ‘seq-empty-p’ for lists.

    (seq-empty-p SEQUENCE) in ‘seq.el’.

    Undocumented

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.

Robert

In GNU Emacs 31.0.50 (build 61, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.16.0) of 2025-07-28 built on rltb
Repository revision: d895d8d06e54ec741d495d23b7cdedf978f85da8
Repository branch: master
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure --without-toolkit-scroll-bars --with-x-toolkit=lucid
 --with-xinput2 'CFLAGS=-Og -ggdb''