unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help documentation for prefix-commands
@ 2015-02-08 23:59 Christopher Genovese
  2015-02-09 14:05 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Genovese @ 2015-02-08 23:59 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1781 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Help documentation for prefix-commands
  2015-02-08 23:59 Help documentation for prefix-commands Christopher Genovese
@ 2015-02-09 14:05 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2015-02-09 14:05 UTC (permalink / raw)
  To: Christopher Genovese; +Cc: emacs-devel

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

Makes sense, indeed, tank you.  Installed into "master",


        Stefan



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-09 14:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-08 23:59 Help documentation for prefix-commands Christopher Genovese
2015-02-09 14:05 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).