[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comment-dwim has no behavior to comment out the current line without
From: |
Will Farrington |
Subject: |
Re: comment-dwim has no behavior to comment out the current line without a region |
Date: |
Tue, 9 Dec 2008 15:03:16 -0500 |
On Dec 9, 2008, at 2:48 PM, Stefan Monnier wrote:
Generally speaking, what makes BOL a "common starting point" to
perform
comment-indent more-so than any other part of the line?
I'm not sure it's much more so, but it's at least as common as
current-indentation, end of line, etc...
Any given place in the line, or end of line, does not have the same
semantic
ambiguity around what behavior should be when dealing with comment-dwim.
BOL and possibly current-indentation are the only logical places where
one
could expect comment-dwim (which should do what you mean) to comment
out the current line.
Additionally, is not BOL semantically the clearest place to run
comment-dwim
and expect it to comment out a given line rather than having it run
comment-indent?
Could be. I'm not saying your idea isn't good. I'm just saying
that it
is not compatible with the current behavior and that the current
behavior makes sense as well. You may find some other way to combine
comment-indent, comment-kill, and comment-region onto a single key.
E.g. M-; M-; is currently unused.
It's an incompatible change, yes.
But it's also an attempt to remove some ambiguity from comment-dwim
(which isn't doing what I mean). If the command is meant to "do what I
mean", then for it not to have any method of commenting out the current
line in a single keystroke is, I think, a flaw. It doesn't necessarily
have to
be my implementation, but given that commenting out a whole line is a
very
common task, comment-dwim should support some manner of doing this
in a single keystroke, in my opinion.