From: Xavier Maillard <xma@gnu.org>
To: xah lee <xah@xahlee.org>, 1286@emacsbugs.donarmstrong.com
Cc: bug-gnu-emacs@gnu.org, bug-submit-list@donarmstrong.com
Subject: bug#1286: comment-dwim on a comment line does not toggle comment
Date: Mon, 3 Nov 2008 12:25:08 +0100 [thread overview]
Message-ID: <200811031125.mA3BP8eZ024503@zogzog.maillard.mobi> (raw)
In-Reply-To: <F5DC8BCE-3380-4798-9B5B-32D5731AA837@xahlee.org> (message from xah lee on Fri, 31 Oct 2008 14:25:09 -0700)
this appears to be like a bug.
in emacs-lisp-mode, if you have a comment like this:
;; This is a comment
and your cursor is somewhere on that line. Now, do comment-dwim, it
doesn't uncomment the line. It just moves the cursor to the T
in This .
Same behavior in cperl mode and probably all others.
I think this might be by design, but it seems counter-intuitive.
I am sure you read it but just in case:
comment-dwim is an interactive autoloaded Lisp function in
`newcomment.el'.
It is bound to M-;.
(comment-dwim ARG)
Call the comment command you want (Do What I Mean).
If the region is active and `transient-mark-mode' is on, call
`comment-region' (unless it only consists of comments, in which
case it calls `uncomment-region').
Else, if the current line is empty, call `comment-insert-comment-function'
if it is defined, otherwise insert a comment and indent it.
Else if a prefix ARG is specified, call `comment-kill'.
Else, call `comment-indent'.
You can configure `comment-style' to change the way regions are commented.
For my point of view, this is well defined here and it behaves
just as described.
Xavier
--
http://www.gnu.org
http://www.april.org
http://www.lolica.org
next prev parent reply other threads:[~2008-11-03 11:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <jwvabcknsf4.fsf-monnier+emacsbugreports@gnu.org>
2008-10-31 21:25 ` bug#1286: comment-dwim on a comment line does not toggle comment xah lee
2008-11-01 1:40 ` bug#1286: marked as done (comment-dwim on a comment line does not toggle comment) Emacs bug Tracking System
2008-11-03 11:25 ` Xavier Maillard [this message]
2008-11-03 21:10 ` bug#1286: comment-dwim on a comment line does not toggle comment xah lee
2008-11-04 16:34 ` Stefan Monnier
2008-11-05 7:25 ` Xavier Maillard
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200811031125.mA3BP8eZ024503@zogzog.maillard.mobi \
--to=xma@gnu.org \
--cc=1286@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@gnu.org \
--cc=bug-submit-list@donarmstrong.com \
--cc=xah@xahlee.org \
/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 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).