From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Genovese Newsgroups: gmane.emacs.devel Subject: Help documentation for prefix-commands Date: Sun, 8 Feb 2015 18:59:36 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c210205edc8f050e9c730c X-Trace: ger.gmane.org 1423440006 18534 80.91.229.3 (9 Feb 2015 00:00:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2015 00:00:06 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 09 01:00:04 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YKblj-00088n-Rn for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2015 01:00:03 +0100 Original-Received: from localhost ([::1]:58136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKblj-0003lF-8o for ged-emacs-devel@m.gmane.org; Sun, 08 Feb 2015 19:00:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKblf-0003l5-4m for emacs-devel@gnu.org; Sun, 08 Feb 2015 19:00:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKbld-0005Bl-S2 for emacs-devel@gnu.org; Sun, 08 Feb 2015 18:59:59 -0500 Original-Received: from mail-vc0-x235.google.com ([2607:f8b0:400c:c03::235]:47376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKbld-0005BZ-P1 for emacs-devel@gnu.org; Sun, 08 Feb 2015 18:59:57 -0500 Original-Received: by mail-vc0-f181.google.com with SMTP id im6so4040511vcb.12 for ; Sun, 08 Feb 2015 15:59:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=hyevYZg4lTpPCWRnJ9Rzm1PdgbMOi+n53fEDtMt9vQY=; b=YIKngjiTqBjyS9m+hTUXgNNa6oEMe5RSKQXZofIofZug1fdRyBnHmmQMi5o9hV/BFD d7U9QQ9bIE5n9r9fkMlUsgjdhHQ85WDD6myAu2YyZdYNR2xkPUm6a3ev8ipImzDrqgES ZGvDCFX0Ucasbq62HoX5bY6Tu05SXpv6cVMTXghOryt8zJlAZqT0me1G7d4CMrLpMxfi N4K9YUbG4n5vbuE1bJ+Ocyxp9cv58cQ1c2FmKGefu9+xrgP1icbbWRuSyAZxLjFG/Kup aiZKGRUtpmq0f9Wt+4RsiRj+JFpkwYQmYUmgHK+IIMY8+Ffrg7XPwnhdivnR9Km3Gbfa OUHg== X-Received: by 10.220.97.1 with SMTP id j1mr8732299vcn.37.1423439996835; Sun, 08 Feb 2015 15:59:56 -0800 (PST) Original-Received: by 10.52.231.39 with HTTP; Sun, 8 Feb 2015 15:59:36 -0800 (PST) X-Google-Sender-Auth: 21srKnAFRl4pQNepHuwzBOuHG_s X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c03::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182643 Archived-At: --001a11c210205edc8f050e9c730c Content-Type: text/plain; charset=UTF-8 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 --001a11c210205edc8f050e9c730c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'd like to be able to add function documentation
to a prefix= command that was setup by define-prefix-command.
For instance,
=C2=A0=C2=A0=C2=A0 (put 'pfx-cmd 'function-documentation= "doc here yada yada...")

but documentation for keym= ap "functions" gets eaten in
describe-function-1 in help-fns.= el.=C2=A0 The documentation
is found as it should be, but then the funct= ion help-fns--signature
kills it for no obvious reason.
<= br>
In particular, help-fns--signature looks like

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

but if th= at were changed to

=C2=A0 (defun help-fns--signature (function doc = real-def real-function)
=C2=A0=C2=A0=C2=A0=C2=A0 (if (keymapp func= tion)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 doc
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ...body))

any non-nil d= ocumentation 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 n= ot needing a function
signature for the prefix command. But if that'= s the reason, this
would seem to go too far by suppressing all documenta= tion.

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

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

Thanks, Chris


<= /div>
--001a11c210205edc8f050e9c730c--