* Eldoc cannot handle CL-style paramlist with default values?
@ 2014-07-11 20:57 Thorsten Jolitz
2014-07-16 21:56 ` Michael Heerdegen
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Jolitz @ 2014-07-11 20:57 UTC (permalink / raw)
To: help-gnu-emacs
Hi List,
I used cl-style 'defun*' recently and noted that for this function
,----
| (defun* puml-pack (&rest args &key ins &allow-other-keys)
`----
eldoc correctly (?) shows
,----
| puml-pack: (&rest ARGS &KEY INS &ALLOW-OTHER-KEYS)
`----
in the minibuffer, but for this function
,----
| (defun* puml-start-activity (arrow &key (lbl "") (nm "") (crlf "\n")
| (pre "(*)") suf ins)
`----
it shows
,----
| puml-start-activity: (40 102 110 32 65 82 82 79 87 32 38 107 101 121 32
| 40 76 66 76 32 34 34 41 32 40 78 77 32 34 34 41 32 40 67 82 76 70 3\
| 2 34 10 34 41 32 40 80 82 69 32 34 40 42 41 34 41 32 83 85 70 32 73 78
| 83 41)
`----
Assuming this is ASCII I get (not surprisingly)
,----
| (fn ARROW &key ...)
`----
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Eldoc cannot handle CL-style paramlist with default values?
2014-07-11 20:57 Eldoc cannot handle CL-style paramlist with default values? Thorsten Jolitz
@ 2014-07-16 21:56 ` Michael Heerdegen
2014-07-16 23:26 ` Thorsten Jolitz
0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2014-07-16 21:56 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: Thorsten Jolitz
Thorsten Jolitz <tjolitz@gmail.com> writes:
> ,----
> | (defun* puml-start-activity (arrow &key (lbl "") (nm "") (crlf "\n")
> | (pre "(*)") suf ins)
> `----
>
> it shows
>
> ,----
> | puml-start-activity: (40 102 110 32 65 82 82 79 87 32 38 107 101 121 32
> | 40 76 66 76 32 34 34 41 32 40 78 77 32 34 34 41 32 40 67 82 76 70 3\
> | 2 34 10 34 41 32 40 80 82 69 32 34 40 42 41 34 41 32 83 85 70 32 73 78
> | 83 41)
> `----
>
> Assuming this is ASCII I get (not surprisingly)
>
> ,----
> | (fn ARROW &key ...)
> `----
Looks like a bug. However, not a bug in eldoc: when you call
describe-function, you'll see that the docstring of the defined function
is broken.
Can you please make a bug report?
Thanks,
Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Eldoc cannot handle CL-style paramlist with default values?
2014-07-16 21:56 ` Michael Heerdegen
@ 2014-07-16 23:26 ` Thorsten Jolitz
2014-07-17 0:34 ` Michael Heerdegen
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Jolitz @ 2014-07-16 23:26 UTC (permalink / raw)
To: help-gnu-emacs
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> ,----
>> | (defun* puml-start-activity (arrow &key (lbl "") (nm "") (crlf "\n")
>> | (pre "(*)") suf ins)
>> `----
>>
>> it shows
>>
>> ,----
>> | puml-start-activity: (40 102 110 32 65 82 82 79 87 32 38 107 101 121 32
>> | 40 76 66 76 32 34 34 41 32 40 78 77 32 34 34 41 32 40 67 82 76 70 3\
>> | 2 34 10 34 41 32 40 80 82 69 32 34 40 42 41 34 41 32 83 85 70 32 73 78
>> | 83 41)
>> `----
>>
>> Assuming this is ASCII I get (not surprisingly)
>>
>> ,----
>> | (fn ARROW &key ...)
>> `----
>
> Looks like a bug. However, not a bug in eldoc: when you call
> describe-function, you'll see that the docstring of the defined function
> is broken.
>
> Can you please make a bug report?
Done.
Its actually the combination of normal args with &key arg with default
values that does not seem to work, e.g.
,----
| (defun* foo (arg1 arg2 &key (arg3 "default")))
`----
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Eldoc cannot handle CL-style paramlist with default values?
2014-07-16 23:26 ` Thorsten Jolitz
@ 2014-07-17 0:34 ` Michael Heerdegen
2014-07-17 1:06 ` Thorsten Jolitz
0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2014-07-17 0:34 UTC (permalink / raw)
To: help-gnu-emacs
Thorsten Jolitz <tjolitz@gmail.com> writes:
> > Can you please make a bug report?
>
> Done.
Thanks!
> Its actually the combination of normal args with &key arg with default
> values that does not seem to work, e.g.
>
> ,----
> | (defun* foo (arg1 arg2 &key (arg3 "default")))
> `----
No, that example works. Actually, the newline character in your
previous post seems to be the culprit, because the docstring building
code assumes that the printed argument list is a one-lined string.
Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Eldoc cannot handle CL-style paramlist with default values?
2014-07-17 0:34 ` Michael Heerdegen
@ 2014-07-17 1:06 ` Thorsten Jolitz
2014-07-17 1:27 ` Michael Heerdegen
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Jolitz @ 2014-07-17 1:06 UTC (permalink / raw)
To: help-gnu-emacs
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> > Can you please make a bug report?
>>
>> Done.
>
> Thanks!
>
>> Its actually the combination of normal args with &key arg with default
>> values that does not seem to work, e.g.
>>
>> ,----
>> | (defun* foo (arg1 arg2 &key (arg3 "default")))
>> `----
>
> No, that example works. Actually, the newline character in your
> previous post seems to be the culprit, because the docstring building
> code assumes that the printed argument list is a one-lined string.
Yes, you are right. I would call this a (kind of) bug, because I
have a use case where its convenient to put a newline as an arg's default
value and only sometimes set it explicitly to nil, so it should work
from (at least one) user's perspective.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Eldoc cannot handle CL-style paramlist with default values?
2014-07-17 1:06 ` Thorsten Jolitz
@ 2014-07-17 1:27 ` Michael Heerdegen
0 siblings, 0 replies; 6+ messages in thread
From: Michael Heerdegen @ 2014-07-17 1:27 UTC (permalink / raw)
To: help-gnu-emacs
Thorsten Jolitz <tjolitz@gmail.com> writes:
> I would call this a (kind of) bug, because I have a use case where its
> convenient to put a newline as an arg's default value and only
> sometimes set it explicitly to nil, so it should work from (at least
> one) user's perspective.
It's a bug, clearly. Often people are just to shy to report such
things.
Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-17 1:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-11 20:57 Eldoc cannot handle CL-style paramlist with default values? Thorsten Jolitz
2014-07-16 21:56 ` Michael Heerdegen
2014-07-16 23:26 ` Thorsten Jolitz
2014-07-17 0:34 ` Michael Heerdegen
2014-07-17 1:06 ` Thorsten Jolitz
2014-07-17 1:27 ` Michael Heerdegen
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).