* bug#24607: 25.1; comment-dwim doc is confused
@ 2016-10-04 3:40 liu.huanjie
2018-02-14 3:25 ` Noam Postavsky
0 siblings, 1 reply; 3+ messages in thread
From: liu.huanjie @ 2016-10-04 3:40 UTC (permalink / raw)
To: 24607
[-- Attachment #1: Type: text/plain, Size: 552 bytes --]
Today I try to write a function that call comment-dwim, it works
when I 'M-x comment-dwim', but when I call it as (comment-dwim), it
says wrong argument number, but after checking the doc and read the
source, I still can't figure out how to give args, which what I want
is the current line where my cursor is.
I add 'nil' to 'comment-dwim' and fixed, but it will be better to
add something about what args should a caller give, and that will
not confused to at least elisp newbie, and it is better.
Thanks.
liu.huanjie@yahoo.com
[-- Attachment #2: Type: text/html, Size: 1563 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#24607: 25.1; comment-dwim doc is confused
2016-10-04 3:40 bug#24607: 25.1; comment-dwim doc is confused liu.huanjie
@ 2018-02-14 3:25 ` Noam Postavsky
2020-08-12 1:06 ` Stefan Kangas
0 siblings, 1 reply; 3+ messages in thread
From: Noam Postavsky @ 2018-02-14 3:25 UTC (permalink / raw)
To: liu.huanjie@yahoo.com; +Cc: 24607
"liu.huanjie@yahoo.com" <liu.huanjie@yahoo.com> writes:
> Today I try to write a function that call comment-dwim, it works
> when I 'M-x comment-dwim', but when I call it as (comment-dwim), it
> says wrong argument number, but after checking the doc and read the
> source, I still can't figure out how to give args, which what I want
> is the current line where my cursor is.
> I add 'nil' to 'comment-dwim' and fixed, but it will be better to
> add something about what args should a caller give, and that will
> not confused to at least elisp newbie, and it is better.
The docstring says
(comment-dwim ARG)
[...]
Else if a prefix ARG is specified, call ‘comment-kill’.
It's a bit terse, but `(elisp) Prefix Command Arguments' says
* `nil', meaning there is no prefix argument.
as a possible value for prefix arguments. I don't think we should
explain that again in every function docstring which takes a prefix
argument.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#24607: 25.1; comment-dwim doc is confused
2018-02-14 3:25 ` Noam Postavsky
@ 2020-08-12 1:06 ` Stefan Kangas
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2020-08-12 1:06 UTC (permalink / raw)
To: Noam Postavsky; +Cc: liu.huanjie@yahoo.com, 24607
tags 24607 + wontfix notabug
close 24607
thanks
Noam Postavsky <npostavs@users.sourceforge.net> writes:
> "liu.huanjie@yahoo.com" <liu.huanjie@yahoo.com> writes:
>
>> Today I try to write a function that call comment-dwim, it works
>> when I 'M-x comment-dwim', but when I call it as (comment-dwim), it
>> says wrong argument number, but after checking the doc and read the
>> source, I still can't figure out how to give args, which what I want
>> is the current line where my cursor is.
>> I add 'nil' to 'comment-dwim' and fixed, but it will be better to
>> add something about what args should a caller give, and that will
>> not confused to at least elisp newbie, and it is better.
>
> The docstring says
>
> (comment-dwim ARG)
>
> [...]
> Else if a prefix ARG is specified, call ‘comment-kill’.
>
> It's a bit terse, but `(elisp) Prefix Command Arguments' says
>
> * `nil', meaning there is no prefix argument.
>
> as a possible value for prefix arguments. I don't think we should
> explain that again in every function docstring which takes a prefix
> argument.
I agree with Noam here, we shouldn't repeat this information in every
function that takes a prefix argument.
I'm therefore closing this bug report.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-12 1:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-04 3:40 bug#24607: 25.1; comment-dwim doc is confused liu.huanjie
2018-02-14 3:25 ` Noam Postavsky
2020-08-12 1:06 ` Stefan Kangas
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).