all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: "liu.huanjie\@yahoo.com" <liu.huanjie@yahoo.com>
Cc: 24607@debbugs.gnu.org
Subject: bug#24607: 25.1; comment-dwim doc is confused
Date: Tue, 13 Feb 2018 22:25:17 -0500	[thread overview]
Message-ID: <87zi4c8d7m.fsf@users.sourceforge.net> (raw)
In-Reply-To: <201610041140493910850@yahoo.com> (liu's message of "Tue, 4 Oct 2016 11:40:52 +0800")

"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.





  reply	other threads:[~2018-02-14  3:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04  3:40 bug#24607: 25.1; comment-dwim doc is confused liu.huanjie
2018-02-14  3:25 ` Noam Postavsky [this message]
2020-08-12  1:06   ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zi4c8d7m.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=24607@debbugs.gnu.org \
    --cc=liu.huanjie@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.