* Toggle commenting in auctex?
@ 2008-04-17 21:05 saneman
2008-04-17 21:50 ` Lennart Borgman (gmail)
[not found] ` <mailman.10518.1208469059.18990.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: saneman @ 2008-04-17 21:05 UTC (permalink / raw)
To: help-gnu-emacs
I am using auctex in emacs22 on Ubuntu 7.10. Is there a way to
comment/uncomment a selected region with a short key?
I would like to just press C-d and the a selected region should be
commented and when I press C-d again the comments should be removed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Toggle commenting in auctex?
2008-04-17 21:05 Toggle commenting in auctex? saneman
@ 2008-04-17 21:50 ` Lennart Borgman (gmail)
[not found] ` <mailman.10518.1208469059.18990.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: Lennart Borgman (gmail) @ 2008-04-17 21:50 UTC (permalink / raw)
To: saneman; +Cc: help-gnu-emacs
saneman wrote:
> I am using auctex in emacs22 on Ubuntu 7.10. Is there a way to
> comment/uncomment a selected region with a short key?
>
> I would like to just press C-d and the a selected region should be
> commented and when I press C-d again the comments should be removed.
Does not comment-dwim (which is in M-;) work for you?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Toggle commenting in auctex?
[not found] ` <mailman.10518.1208469059.18990.help-gnu-emacs@gnu.org>
@ 2008-04-17 22:22 ` saneman
2008-04-18 7:58 ` Rupert Swarbrick
0 siblings, 1 reply; 7+ messages in thread
From: saneman @ 2008-04-17 22:22 UTC (permalink / raw)
To: help-gnu-emacs
Lennart Borgman (gmail) wrote:
> saneman wrote:
>> I am using auctex in emacs22 on Ubuntu 7.10. Is there a way to
>> comment/uncomment a selected region with a short key?
>>
>> I would like to just press C-d and the a selected region should be
>> commented and when I press C-d again the comments should be removed.
>
> Does not comment-dwim (which is in M-;) work for you?
>
>
I works when I choose it from the menu, but how do I redefine it to C-d?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Toggle commenting in auctex?
2008-04-17 22:22 ` saneman
@ 2008-04-18 7:58 ` Rupert Swarbrick
2008-04-18 9:13 ` saneman
0 siblings, 1 reply; 7+ messages in thread
From: Rupert Swarbrick @ 2008-04-18 7:58 UTC (permalink / raw)
To: help-gnu-emacs
Try something like
(global-set-key "\C-d" 'comment-dwim)
Of course, C-d is normally delete character... you might want to find
a different key to bind comments to. For more info, see chapter 57.4
of the emacs manual.
Rupert
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Toggle commenting in auctex?
2008-04-18 7:58 ` Rupert Swarbrick
@ 2008-04-18 9:13 ` saneman
2008-04-18 10:48 ` Johan Bockgård
0 siblings, 1 reply; 7+ messages in thread
From: saneman @ 2008-04-18 9:13 UTC (permalink / raw)
To: help-gnu-emacs
Rupert Swarbrick wrote:
> Try something like
>
> (global-set-key "\C-d" 'comment-dwim)
>
> Of course, C-d is normally delete character... you might want to find
> a different key to bind comments to. For more info, see chapter 57.4
> of the emacs manual.
>
> Rupert
In emacs 'd' and the 'delete' key are the same for some reason. Is there
a way to assign the operation to 'd' without also assigning it too 'delete'?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Toggle commenting in auctex?
2008-04-18 9:13 ` saneman
@ 2008-04-18 10:48 ` Johan Bockgård
2008-04-18 11:27 ` saneman
0 siblings, 1 reply; 7+ messages in thread
From: Johan Bockgård @ 2008-04-18 10:48 UTC (permalink / raw)
To: help-gnu-emacs
saneman <ddd@sdf.com> writes:
> In emacs 'd' and the 'delete' key are the same for some reason. Is
> there a way to assign the operation to 'd' without also assigning it
> too 'delete'?
(global-set-key "\C-d" 'comment-dwim)
(define-key function-key-map [delete] [deletechar])
--
Johan Bockgård
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Toggle commenting in auctex?
2008-04-18 10:48 ` Johan Bockgård
@ 2008-04-18 11:27 ` saneman
0 siblings, 0 replies; 7+ messages in thread
From: saneman @ 2008-04-18 11:27 UTC (permalink / raw)
To: help-gnu-emacs
Johan Bockgård wrote:
> saneman <ddd@sdf.com> writes:
>
>> In emacs 'd' and the 'delete' key are the same for some reason. Is
>> there a way to assign the operation to 'd' without also assigning it
>> too 'delete'?
>
> (global-set-key "\C-d" 'comment-dwim)
> (define-key function-key-map [delete] [deletechar])
>
Does not work. If I have selected a region of text and press delete it
get commented and not deleted.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-04-18 11:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-17 21:05 Toggle commenting in auctex? saneman
2008-04-17 21:50 ` Lennart Borgman (gmail)
[not found] ` <mailman.10518.1208469059.18990.help-gnu-emacs@gnu.org>
2008-04-17 22:22 ` saneman
2008-04-18 7:58 ` Rupert Swarbrick
2008-04-18 9:13 ` saneman
2008-04-18 10:48 ` Johan Bockgård
2008-04-18 11:27 ` saneman
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.