all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#12884: 24.2.50; defun*: argument lists in documentation look terrible
@ 2012-11-14 16:47 Michael Heerdegen
  2012-11-14 19:49 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2012-11-14 16:47 UTC (permalink / raw)
  To: 12884

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/''






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

end of thread, other threads:[~2012-11-15  1:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14 16:47 bug#12884: 24.2.50; defun*: argument lists in documentation look terrible Michael Heerdegen
2012-11-14 19:49 ` Stefan Monnier
2012-11-14 21:51   ` Michael Heerdegen
2012-11-15  1:28     ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.