* comment-dwim has no behavior to comment out the current line without a region
@ 2008-12-09 6:06 Will Farrington
2008-12-09 8:28 ` Will Farrington
2008-12-09 18:40 ` Stefan Monnier
0 siblings, 2 replies; 13+ messages in thread
From: Will Farrington @ 2008-12-09 6:06 UTC (permalink / raw
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
The subject states my specific objection to the current behavior.
Yes, for many languages, it takes the same number of keystrokes to
insert a comment character; however, there are languages/modes where
this is *not* true (for example, C89 or anything based on XML).
Additionally, it makes sense to have comment-dwim handle all cases of
managing commented material and comments.
The proposed diff adds the following additional behavior:
If the point is at `line-beginning-position' (and the region is
inactive), call `comment-region'
on the whole line (unless the line consists of comments, in which
case it calls `uncomment-region').
The patch is attached below:
[-- Attachment #2: 0001-Change-comment-dwim-behavior-to-comment-out-the-curr.patch --]
[-- Type: application/octet-stream, Size: 3507 bytes --]
From b3a783075ad4eafe9e2303442d68f6bec41cfaa6 Mon Sep 17 00:00:00 2001
From: Will Farrington <wcfarrington@gmail.com>
Date: Tue, 9 Dec 2008 01:00:18 -0500
Subject: [PATCH] Change comment-dwim behavior to comment out the current line when region is inactive and point is at the line-beginning-position.
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 91ece5a..acac17b 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -1159,6 +1159,9 @@ is passed on to the respective function."
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 point is at `line-beginning-position', call `comment-region'
+ on the whole line (unless the line 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'.
@@ -1168,23 +1171,25 @@ You can configure `comment-style' to change the way regions are commented."
(comment-normalize-vars)
(if (and mark-active transient-mark-mode)
(comment-or-uncomment-region (region-beginning) (region-end) arg)
- (if (save-excursion (beginning-of-line) (not (looking-at "\\s-*$")))
- ;; FIXME: If there's no comment to kill on this line and ARG is
- ;; specified, calling comment-kill is not very clever.
- (if arg (comment-kill (and (integerp arg) arg)) (comment-indent))
- ;; Inserting a comment on a blank line. comment-indent calls
- ;; c-i-c-f if needed in the non-blank case.
- (if comment-insert-comment-function
- (funcall comment-insert-comment-function)
- (let ((add (comment-add arg)))
- ;; Some modes insist on keeping column 0 comment in column 0
- ;; so we need to move away from it before inserting the comment.
- (indent-according-to-mode)
- (insert (comment-padright comment-start add))
- (save-excursion
- (unless (string= "" comment-end)
- (insert (comment-padleft comment-end add)))
- (indent-according-to-mode)))))))
+ (if (eq (point) (line-beginning-position))
+ (comment-or-uncomment-region (line-beginning-position) (line-end-position))
+ (if (save-excursion (beginning-of-line) (not (looking-at "\\s-*$")))
+ ;; FIXME: If there's no comment to kill on this line and ARG is
+ ;; specified, calling comment-kill is not very clever.
+ (if arg (comment-kill (and (integerp arg) arg)) (comment-indent))
+ ;; Inserting a comment on a blank line. comment-indent calls
+ ;; c-i-c-f if needed in the non-blank case.
+ (if comment-insert-comment-function
+ (funcall comment-insert-comment-function)
+ (let ((add (comment-add arg)))
+ ;; Some modes insist on keeping column 0 comment in column 0
+ ;; so we need to move away from it before inserting the comment.
+ (indent-according-to-mode)
+ (insert (comment-padright comment-start add))
+ (save-excursion
+ (unless (string= "" comment-end)
+ (insert (comment-padleft comment-end add)))
+ (indent-according-to-mode))))))))
;;;###autoload
(defcustom comment-auto-fill-only-comments nil
--
1.6.0.4
[-- Attachment #3: Type: text/plain, Size: 1 bytes --]
^ permalink raw reply related [flat|nested] 13+ messages in thread
* comment-dwim has no behavior to comment out the current line without a region
2008-12-09 6:06 comment-dwim has no behavior to comment out the current line without a region Will Farrington
@ 2008-12-09 8:28 ` Will Farrington
2008-12-09 9:22 ` Will Farrington
2008-12-09 12:40 ` Eli Zaretskii
2008-12-09 18:40 ` Stefan Monnier
1 sibling, 2 replies; 13+ messages in thread
From: Will Farrington @ 2008-12-09 8:28 UTC (permalink / raw
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 800 bytes --]
Resending this because it seems to have gotten lost along the way (at
least from what I could tell):
--------------
The subject states my specific objection to the current behavior.
Yes, for many languages, it takes the same number of keystrokes to
insert a comment character; however, there are languages/modes where
this is *not* true (for example, C89 or anything based on XML).
Additionally, it makes sense to have comment-dwim handle all cases of
managing commented material and comments.
The proposed diff adds the following additional behavior:
If the point is at `line-beginning-position' (and the region is
inactive), call `comment-region'
on the whole line (unless the line consists of comments, in which
case it calls `uncomment-region').
The patch is attached below:
[-- Attachment #2: 0001-Change-comment-dwim-behavior-to-comment-out-the-curr.patch --]
[-- Type: application/octet-stream, Size: 3507 bytes --]
From b3a783075ad4eafe9e2303442d68f6bec41cfaa6 Mon Sep 17 00:00:00 2001
From: Will Farrington <wcfarrington@gmail.com>
Date: Tue, 9 Dec 2008 01:00:18 -0500
Subject: [PATCH] Change comment-dwim behavior to comment out the current line when region is inactive and point is at the line-beginning-position.
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 91ece5a..acac17b 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -1159,6 +1159,9 @@ is passed on to the respective function."
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 point is at `line-beginning-position', call `comment-region'
+ on the whole line (unless the line 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'.
@@ -1168,23 +1171,25 @@ You can configure `comment-style' to change the way regions are commented."
(comment-normalize-vars)
(if (and mark-active transient-mark-mode)
(comment-or-uncomment-region (region-beginning) (region-end) arg)
- (if (save-excursion (beginning-of-line) (not (looking-at "\\s-*$")))
- ;; FIXME: If there's no comment to kill on this line and ARG is
- ;; specified, calling comment-kill is not very clever.
- (if arg (comment-kill (and (integerp arg) arg)) (comment-indent))
- ;; Inserting a comment on a blank line. comment-indent calls
- ;; c-i-c-f if needed in the non-blank case.
- (if comment-insert-comment-function
- (funcall comment-insert-comment-function)
- (let ((add (comment-add arg)))
- ;; Some modes insist on keeping column 0 comment in column 0
- ;; so we need to move away from it before inserting the comment.
- (indent-according-to-mode)
- (insert (comment-padright comment-start add))
- (save-excursion
- (unless (string= "" comment-end)
- (insert (comment-padleft comment-end add)))
- (indent-according-to-mode)))))))
+ (if (eq (point) (line-beginning-position))
+ (comment-or-uncomment-region (line-beginning-position) (line-end-position))
+ (if (save-excursion (beginning-of-line) (not (looking-at "\\s-*$")))
+ ;; FIXME: If there's no comment to kill on this line and ARG is
+ ;; specified, calling comment-kill is not very clever.
+ (if arg (comment-kill (and (integerp arg) arg)) (comment-indent))
+ ;; Inserting a comment on a blank line. comment-indent calls
+ ;; c-i-c-f if needed in the non-blank case.
+ (if comment-insert-comment-function
+ (funcall comment-insert-comment-function)
+ (let ((add (comment-add arg)))
+ ;; Some modes insist on keeping column 0 comment in column 0
+ ;; so we need to move away from it before inserting the comment.
+ (indent-according-to-mode)
+ (insert (comment-padright comment-start add))
+ (save-excursion
+ (unless (string= "" comment-end)
+ (insert (comment-padleft comment-end add)))
+ (indent-according-to-mode))))))))
;;;###autoload
(defcustom comment-auto-fill-only-comments nil
--
1.6.0.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: comment-dwim has no behavior to comment out the current line without a region
2008-12-09 8:28 ` Will Farrington
@ 2008-12-09 9:22 ` Will Farrington
2008-12-09 12:40 ` Eli Zaretskii
1 sibling, 0 replies; 13+ messages in thread
From: Will Farrington @ 2008-12-09 9:22 UTC (permalink / raw
To: emacs-devel, Will Farrington
It seems that for whatever reason the .patch got treated as binary
data. Here's the patch in-line:
From b3a783075ad4eafe9e2303442d68f6bec41cfaa6 Mon Sep 17 00:00:00 2001
From: Will Farrington <wcfarrington@gmail.com>
Date: Tue, 9 Dec 2008 01:00:18 -0500
Subject: [PATCH] Change comment-dwim behavior to comment out the
current line when region is inactive and point is at the line-
beginning-position.
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 91ece5a..acac17b 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -1159,6 +1159,9 @@ is passed on to the respective function."
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 point is at `line-beginning-position', call `comment-
region'
+ on the whole line (unless the line 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'.
@@ -1168,23 +1171,25 @@ You can configure `comment-style' to change
the way regions are commented."
(comment-normalize-vars)
(if (and mark-active transient-mark-mode)
(comment-or-uncomment-region (region-beginning) (region-end)
arg)
- (if (save-excursion (beginning-of-line) (not (looking-at "\\s-*
$")))
- ;; FIXME: If there's no comment to kill on this line and ARG is
- ;; specified, calling comment-kill is not very clever.
- (if arg (comment-kill (and (integerp arg) arg)) (comment-indent))
- ;; Inserting a comment on a blank line. comment-indent calls
- ;; c-i-c-f if needed in the non-blank case.
- (if comment-insert-comment-function
- (funcall comment-insert-comment-function)
- (let ((add (comment-add arg)))
- ;; Some modes insist on keeping column 0 comment in column 0
- ;; so we need to move away from it before inserting the
comment.
- (indent-according-to-mode)
- (insert (comment-padright comment-start add))
- (save-excursion
- (unless (string= "" comment-end)
- (insert (comment-padleft comment-end add)))
- (indent-according-to-mode)))))))
+ (if (eq (point) (line-beginning-position))
+ (comment-or-uncomment-region (line-beginning-position) (line-
end-position))
+ (if (save-excursion (beginning-of-line) (not (looking-at "\\s-*
$")))
+ ;; FIXME: If there's no comment to kill on this line and
ARG is
+ ;; specified, calling comment-kill is not very clever.
+ (if arg (comment-kill (and (integerp arg) arg)) (comment-
indent))
+ ;; Inserting a comment on a blank line. comment-indent calls
+ ;; c-i-c-f if needed in the non-blank case.
+ (if comment-insert-comment-function
+ (funcall comment-insert-comment-function)
+ (let ((add (comment-add arg)))
+ ;; Some modes insist on keeping column 0 comment in
column 0
+ ;; so we need to move away from it before inserting the
comment.
+ (indent-according-to-mode)
+ (insert (comment-padright comment-start add))
+ (save-excursion
+ (unless (string= "" comment-end)
+ (insert (comment-padleft comment-end add)))
+ (indent-according-to-mode))))))))
;;;###autoload
(defcustom comment-auto-fill-only-comments nil
--
1.6.0.4
On Dec 9, 2008, at 3:28 AM, Will Farrington wrote:
> Resending this because it seems to have gotten lost along the way
> (at least from what I could tell):
> --------------
>
> The subject states my specific objection to the current behavior.
>
> Yes, for many languages, it takes the same number of keystrokes to
> insert a comment character; however, there are languages/modes where
> this is *not* true (for example, C89 or anything based on XML).
> Additionally, it makes sense to have comment-dwim handle all cases
> of managing commented material and comments.
>
> The proposed diff adds the following additional behavior:
>
> If the point is at `line-beginning-position' (and the region is
> inactive), call `comment-region'
> on the whole line (unless the line consists of comments, in which
> case it calls `uncomment-region').
>
> The patch is attached below:
> <0001-Change-comment-dwim-behavior-to-comment-out-the-curr.patch>
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: comment-dwim has no behavior to comment out the current line without a region
2008-12-09 8:28 ` Will Farrington
2008-12-09 9:22 ` Will Farrington
@ 2008-12-09 12:40 ` Eli Zaretskii
2008-12-09 18:27 ` Stefan Monnier
1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2008-12-09 12:40 UTC (permalink / raw
To: Will Farrington; +Cc: emacs-devel
> From: Will Farrington <wcfarrington@gmail.com>
> Date: Tue, 9 Dec 2008 03:28:29 -0500
>
> Resending this because it seems to have gotten lost along the way (at
> least from what I could tell):
No, it was not lost, it was held for moderator's approval, since you
were not a subscriber to this list when you sent it.
Emacs-devel is a moderated list, which is the main reason why it is
100% spam-free.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: comment-dwim has no behavior to comment out the current line without a region
2008-12-09 12:40 ` Eli Zaretskii
@ 2008-12-09 18:27 ` Stefan Monnier
2008-12-09 22:54 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2008-12-09 18:27 UTC (permalink / raw
To: Eli Zaretskii; +Cc: Will Farrington, emacs-devel
> Emacs-devel is a moderated list, which is the main reason why it is
> 100% spam-free.
And it's moderated beautifully, BTW. Thank you very much for it,
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: comment-dwim has no behavior to comment out the current line without a region
2008-12-09 6:06 comment-dwim has no behavior to comment out the current line without a region Will Farrington
2008-12-09 8:28 ` Will Farrington
@ 2008-12-09 18:40 ` Stefan Monnier
2008-12-09 18:50 ` Will Farrington
1 sibling, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2008-12-09 18:40 UTC (permalink / raw
To: Will Farrington; +Cc: emacs-devel
> The proposed diff adds the following additional behavior:
> If the point is at `line-beginning-position' (and the region is inactive),
> call `comment-region'
> on the whole line (unless the line consists of comments, in which
> case it calls `uncomment-region').
Sadly, BOL is a very common starting point to perform comment-indent,
which is what M-; does currently (and has done for ages) instead of
commenting out a region.
So I don't think this new behavior is compatible with the current use of
M-;.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: comment-dwim has no behavior to comment out the current line without a region
2008-12-09 18:40 ` Stefan Monnier
@ 2008-12-09 18:50 ` Will Farrington
2008-12-09 19:48 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: Will Farrington @ 2008-12-09 18:50 UTC (permalink / raw
To: Stefan Monnier; +Cc: emacs-devel
On Dec 9, 2008, at 1:40 PM, Stefan Monnier wrote:
>> The proposed diff adds the following additional behavior:
>
>> If the point is at `line-beginning-position' (and the region is
>> inactive),
>> call `comment-region'
>> on the whole line (unless the line consists of comments, in which
>> case it calls `uncomment-region').
>
> Sadly, BOL is a very common starting point to perform comment-indent,
> which is what M-; does currently (and has done for ages) instead of
> commenting out a region.
>
> So I don't think this new behavior is compatible with the current
> use of
> M-;.
Generally speaking, what makes BOL a "common starting point" to perform
comment-indent more-so than any other part of the 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?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: comment-dwim has no behavior to comment out the current line without a region
2008-12-09 18:50 ` Will Farrington
@ 2008-12-09 19:48 ` Stefan Monnier
2008-12-09 20:03 ` Will Farrington
2008-12-10 12:22 ` Will Farrington
0 siblings, 2 replies; 13+ messages in thread
From: Stefan Monnier @ 2008-12-09 19:48 UTC (permalink / raw
To: Will Farrington; +Cc: emacs-devel
> 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...
> 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.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: comment-dwim has no behavior to comment out the current line without a region
2008-12-09 19:48 ` Stefan Monnier
@ 2008-12-09 20:03 ` Will Farrington
2008-12-10 12:22 ` Will Farrington
1 sibling, 0 replies; 13+ messages in thread
From: Will Farrington @ 2008-12-09 20:03 UTC (permalink / raw
To: Stefan Monnier; +Cc: emacs-devel
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: comment-dwim has no behavior to comment out the current line without a region
2008-12-09 18:27 ` Stefan Monnier
@ 2008-12-09 22:54 ` Eli Zaretskii
0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2008-12-09 22:54 UTC (permalink / raw
To: Stefan Monnier; +Cc: wcfarrington, emacs-devel
> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: Will Farrington <wcfarrington@gmail.com>, emacs-devel@gnu.org
> Date: Tue, 09 Dec 2008 13:27:47 -0500
>
> > Emacs-devel is a moderated list, which is the main reason why it is
> > 100% spam-free.
>
> And it's moderated beautifully, BTW. Thank you very much for it,
You are welcome.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: comment-dwim has no behavior to comment out the current line without a region
2008-12-09 19:48 ` Stefan Monnier
2008-12-09 20:03 ` Will Farrington
@ 2008-12-10 12:22 ` Will Farrington
2008-12-11 15:27 ` Stefan Monnier
1 sibling, 1 reply; 13+ messages in thread
From: Will Farrington @ 2008-12-10 12:22 UTC (permalink / raw
To: Stefan Monnier; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1519 bytes --]
On second inspection, C-M-; is not bound by default.
How would you feel about binding the following function to that
keybinding?
(defun comment-dwim-line (&optional arg)
""
(interactive "*P")
(comment-normalize-vars)
(if (not (region-active-p))
(comment-or-uncomment-region (line-beginning-position) (line-
end-position))
(comment-dwim arg)))
Obviously a better description than "" is needed, but the behavior of
this has changed a bit since it can now afford to (being a different
function and keybinding). Rather than relying on the position of
(point), it has a clear established behavior of commenting out the
current line unless the region is active.
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...
>
>> 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.
>
>
> Stefan
[-- Attachment #2: Type: text/html, Size: 11577 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: comment-dwim has no behavior to comment out the current line without a region
2008-12-10 12:22 ` Will Farrington
@ 2008-12-11 15:27 ` Stefan Monnier
2008-12-11 18:26 ` Ted Zlatanov
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2008-12-11 15:27 UTC (permalink / raw
To: Will Farrington; +Cc: emacs-devel
> On second inspection, C-M-; is not bound by default.
> How would you feel about binding the following function to that keybinding?
To tell you the truth, I'm not very enthusiastic at the idea of using
one of the few remaining bindings for such a small feature. I'd much
rather provide a "mark-line" key that could then be combined with M-; to
comment out the current line (since it would then be usable in other
contexts as well).
I think that M-; M-; holds more promise.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: comment-dwim has no behavior to comment out the current line without a region
2008-12-11 15:27 ` Stefan Monnier
@ 2008-12-11 18:26 ` Ted Zlatanov
0 siblings, 0 replies; 13+ messages in thread
From: Ted Zlatanov @ 2008-12-11 18:26 UTC (permalink / raw
To: emacs-devel
On Thu, 11 Dec 2008 10:27:04 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> On second inspection, C-M-; is not bound by default.
>> How would you feel about binding the following function to that keybinding?
SM> To tell you the truth, I'm not very enthusiastic at the idea of using
SM> one of the few remaining bindings for such a small feature. I'd much
SM> rather provide a "mark-line" key that could then be combined with M-; to
SM> comment out the current line (since it would then be usable in other
SM> contexts as well).
SM> I think that M-; M-; holds more promise.
Also it's less painful (in terms of finger contortion) to do M-; twice,
and it will work on all terminals with the ESC key for Meta, so I like
it much better.
Ted
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2008-12-11 18:26 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-09 6:06 comment-dwim has no behavior to comment out the current line without a region Will Farrington
2008-12-09 8:28 ` Will Farrington
2008-12-09 9:22 ` Will Farrington
2008-12-09 12:40 ` Eli Zaretskii
2008-12-09 18:27 ` Stefan Monnier
2008-12-09 22:54 ` Eli Zaretskii
2008-12-09 18:40 ` Stefan Monnier
2008-12-09 18:50 ` Will Farrington
2008-12-09 19:48 ` Stefan Monnier
2008-12-09 20:03 ` Will Farrington
2008-12-10 12:22 ` Will Farrington
2008-12-11 15:27 ` Stefan Monnier
2008-12-11 18:26 ` Ted Zlatanov
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.