emacs-devel
[Top][All Lists]
Advanced

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

Help documentation for prefix-commands


From: Christopher Genovese
Subject: Help documentation for prefix-commands
Date: Sun, 8 Feb 2015 18:59:36 -0500

I'd like to be able to add function documentation
to a prefix command that was setup by define-prefix-command.
For instance,

    (put 'pfx-cmd 'function-documentation "doc here yada yada...")

but documentation for keymap "functions" gets eaten in
describe-function-1 in help-fns.el.  The documentation
is found as it should be, but then the function help-fns--signature
kills it for no obvious reason.

In particular, help-fns--signature looks like

  (defun help-fns--signature (function doc real-def real-function)
      (unless (keymapp function)
          ...body))

but if that were changed to

  (defun help-fns--signature (function doc real-def real-function)
     (if (keymapp function)
          doc
       ...body))

any non-nil documentation on the prefix command would be
printed in describe-function and nothing else would be perturbed.

The comments in help-fns--signature (and the name) suggest
that this omission was motivated by not needing a function
signature for the prefix command. But if that's the reason, this
would seem to go too far by suppressing all documentation.

Is there a reason not to allow documentation for prefix commands?
Can this simple change be made?

(Running Gnu Emacs 24.4.1 on Mac OS X 10.7.5.)

Thanks, Chris




reply via email to

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