[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24607: 25.1; comment-dwim doc is confused
From: |
Noam Postavsky |
Subject: |
bug#24607: 25.1; comment-dwim doc is confused |
Date: |
Tue, 13 Feb 2018 22:25:17 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) |
"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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#24607: 25.1; comment-dwim doc is confused,
Noam Postavsky <=