[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash comments in emacs
From: |
Rupert Swarbrick |
Subject: |
Re: bash comments in emacs |
Date: |
Tue, 29 Apr 2008 11:44:39 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
"Amadeus W.M." <amadeus84@verizon.net> writes:
> On Sun, 27 Apr 2008 11:29:23 +0200, Pascal Bourguignon wrote:
>
>> "Amadeus W.M." <amadeus84@verizon.net> writes:
>>
>>> How can I set up a shortcut to comment out or uncomment whole regions
>>> in a bash script? Like C-c C-c for C++ comments.
>>
>> C-;
>
> Thanks. Just to be sure, you mean Ctrl followed by a semicolon (;) right?
> Unfortunately didn't work. M-; did though, and that's good enough.
>
>
>>
>> Note that it's C-; also for C++ comments and any other comment. I don't
>> you where you got that C-c C-c...
>
I think by default, in C mode, C-c C-c calls comment-region, which I
assumed was what Amadeus was originally after. You could always do
something like
(add-hook 'sh-mode-hook
(lambda ()
(define-key sh-mode-map "\C-c\C-c" 'comment-region)))
(pilfering blatantly from the code I just snipped)
Rupert