From: Rupert Swarbrick <rswarbrick@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: bash comments in emacs
Date: Tue, 29 Apr 2008 11:44:39 +0100 [thread overview]
Message-ID: <8763u1rld4.fsf@gmail.com> (raw)
In-Reply-To: pan.2008.04.27.21.54.23@verizon.net
"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
prev parent reply other threads:[~2008-04-29 10:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-27 2:34 bash comments in emacs Amadeus W.M.
2008-04-27 9:29 ` Pascal Bourguignon
2008-04-27 12:02 ` Richard G Riley
2008-04-27 21:54 ` Amadeus W.M.
2008-04-29 10:44 ` Rupert Swarbrick [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8763u1rld4.fsf@gmail.com \
--to=rswarbrick@gmail.com \
--cc=help-gnu-emacs@gnu.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 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.