From: Michael Heerdegen <michael_heerdegen@web.de>
To: 12884@debbugs.gnu.org
Subject: bug#12884: 24.2.50; defun*: argument lists in documentation look terrible
Date: Wed, 14 Nov 2012 17:47:20 +0100 [thread overview]
Message-ID: <87ip985dyf.fsf@web.de> (raw)
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/''
next reply other threads:[~2012-11-14 16:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 16:47 Michael Heerdegen [this message]
2012-11-14 19:49 ` bug#12884: 24.2.50; defun*: argument lists in documentation look terrible Stefan Monnier
2012-11-14 21:51 ` Michael Heerdegen
2012-11-15 1:28 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ip985dyf.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=12884@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).