From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#12884: 24.2.50; defun*: argument lists in documentation look terrible Date: Wed, 14 Nov 2012 17:47:20 +0100 Message-ID: <87ip985dyf.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1352911655 20668 80.91.229.3 (14 Nov 2012 16:47:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Nov 2012 16:47:35 +0000 (UTC) To: 12884@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 14 17:47:45 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1TYg7s-0006FQ-1N for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Nov 2012 17:47:44 +0100 Original-Received: from localhost ([::1]:45904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYg7i-0000Qh-99 for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Nov 2012 11:47:34 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYg7d-0000PY-T1 for bug-gnu-emacs@gnu.org; Wed, 14 Nov 2012 11:47:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYg7a-0006fJ-PD for bug-gnu-emacs@gnu.org; Wed, 14 Nov 2012 11:47:29 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYg7a-0006fF-Kx for bug-gnu-emacs@gnu.org; Wed, 14 Nov 2012 11:47:26 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TYg8A-00086F-FV for bug-gnu-emacs@gnu.org; Wed, 14 Nov 2012 11:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Nov 2012 16:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12884 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.135291165531093 (code B ref -1); Wed, 14 Nov 2012 16:48:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Nov 2012 16:47:35 +0000 Original-Received: from localhost ([127.0.0.1]:42389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TYg7i-00085S-LE for submit@debbugs.gnu.org; Wed, 14 Nov 2012 11:47:34 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38146) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TYg7f-00085K-Np for submit@debbugs.gnu.org; Wed, 14 Nov 2012 11:47:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYg72-0006a1-E8 for submit@debbugs.gnu.org; Wed, 14 Nov 2012 11:46:55 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:55275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYg72-0006Zw-AV for submit@debbugs.gnu.org; Wed, 14 Nov 2012 11:46:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYg6z-0000GB-5E for bug-gnu-emacs@gnu.org; Wed, 14 Nov 2012 11:46:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYg6w-0006ZG-2G for bug-gnu-emacs@gnu.org; Wed, 14 Nov 2012 11:46:49 -0500 Original-Received: from mout.web.de ([212.227.17.11]:54966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYg6v-0006Xr-OI for bug-gnu-emacs@gnu.org; Wed, 14 Nov 2012 11:46:45 -0500 Original-Received: from drachen.dragon ([89.204.137.194]) by smtp.web.de (mrweb102) with ESMTPA (Nemesis) id 0M4qav-1TOJKL1WE1-00yrcc; Wed, 14 Nov 2012 17:46:44 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-Provags-ID: V02:K0:RugPdVsicf67HKlB83iKbjEtEwj21qQ0ezwuz1Ww2GB qDnmQDwQyaOSyPQ0unD7zsVIdxPl3pnFk3xmXIOJi74qS5uHoO of63GNAxX+MDPU012xQeaG7o5TVAr9HQs9nOQZTIH2PYqk8H9J P8ovK6l2xNEOMTb1SnYmojC7n5KR3ZBhahK5pyNlrksz0KTCOX j4GVO+oSp2t5uEAW7o/zyi9r8ddayMVijrTEaUJIXk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -3.4 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-Spam-Score: -4.2 (----) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:66920 Archived-At: If I e.g. define something like that: (defun* my-toggle-item (mode-or-var &key ((:selected enabled-spec) `(am-bound-and-true-p ',mode-or-var)) ((:help help-string) (am-make-symbol-docstring mode-or-var))) "Toggle item creater for modes and flags." ...) the docstring then looks like that for me: | my-toggle-item is a Lisp function. | | (my-toggle-item #:MODE-OR-VAR &key ((:selected #:ENABLED-SPEC) (\` | (am-bound-and-true-p (quote (\, mode-or-var))))) ((:help | #:HELP-STRING) (am-make-symbol-docstring mode-or-var))) | | Toggle item creater for modes and flags. This looks terrible with all this #: and quote \, stuff. The culprit is `cl--transform-lambda', which just uses this: (format "%S" (cons 'fn (cl--make-usage-args orig-args))) I think we can easily improve this, e.g. by using something like (let (print-gensym print-level print-length (print-quoted t)) (format "%S" (cons 'fn (cl--make-usage-args orig-args)))) instead. Looks much better in *Help* and with eldoc. Thanks, Michael. In GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2012-11-13 on drachen Bzr revision: rgm@gnu.org-20121113081658-e63viomclbw6bjee Windowing system distributor `The X.Org Foundation', version 11.0.10707000 System Description: Debian GNU/Linux testing (wheezy) Configured using: `configure '--prefix=/usr/local/built/''