emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#12884: closed (24.2.50; defun*: argument lists in


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#12884: closed (24.2.50; defun*: argument lists in documentation look terrible)
Date: Thu, 15 Nov 2012 01:29:02 +0000

Your message dated Wed, 14 Nov 2012 20:28:07 -0500
with message-id <address@hidden>
and subject line Re: bug#12884: 24.2.50; defun*: argument lists in 
documentation look terrible
has caused the debbugs.gnu.org bug report #12884,
regarding 24.2.50; defun*: argument lists in documentation look terrible
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
12884: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12884
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.2.50; defun*: argument lists in documentation look terrible Date: Wed, 14 Nov 2012 17:47:20 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)
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: address@hidden
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/''




--- End Message ---
--- Begin Message --- Subject: Re: bug#12884: 24.2.50; defun*: argument lists in documentation look terrible Date: Wed, 14 Nov 2012 20:28:07 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
>> > This looks terrible with all this #: and quote \, stuff.
>> Binding print-quoted makes sense to improve the quote/backquote syntax.
>> But I don't understand why we have those #: in there.  I understand it's
>> there to say the symbols are not interned, but I don't understand why
>> they're not interned.
> See `cl--make-usage-args'.  It upcases the names of the arguments and
> makes them a symbol again.  The one who wrote that wanted that no new
> symbols are interned, and so used `make-symbol'.  Dunno if there's a
> reason to do so.

Ah, yes of course.
I installed a patch similar to yours, except I didn't touch print-length
and print-level, since I can't think of a good reason to favor nil
for them.


        Stefan


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]