From: Alan Mackenzie <acm@muc.de>
To: William Xue <william.xue@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: How to use c-style to comment a region?
Date: 10 May 2007 23:14:01 +0200 [thread overview]
Message-ID: <20070510223600.GA4176@muc.de> (raw)
In-Reply-To: <op.tr1viwlvhkv0w5@williamnb>
Hi, William!
On Thu, May 10, 2007 at 09:46:34AM +0800, William Xue wrote:
> Hi,
> In cpp files, in following code, for e.g.:
> ln_time_out.QuadPart = -((LONGLONG) 10 * 1000 * 1000 * 5);
> I wanted to modify the second 1000 to 2000 for testing, but wanted to
> keep the orignal value for restoring it later.
> after selected 1000 and pressed C-c C-c :
> ln_time_out.QuadPart = -((LONGLONG) 10 * 1000 * // 1000
> * 5); // 1 second
> Can it be:
> ln_time_out.QuadPart = -((LONGLONG) 10 * 1000 * /* 1000
> */ * 5); // 1 second
> Maybe there are some settings for it, but I havn't found them.
No, there aren't any such settings.
> I know that add /* -*- C -*- */ at the beginning of the file can affect
> the comment style for the whole file.
> That's not my request, I only want a command or a keybinding.
No, you certainly wouldn't want to have to use C mode just to get the
right sort of comments.
Some while ago, a CC Mode user requested a feature to toggle the type of
comment that M-; inserts within C Mode (i.e. /* ... */ <-> // ... \n).
I intend to write a new command to do just this, probably binding it to
C-c C-;. This will hopefully get implemented in CC Mode 5.32, which I am
hoping to release shortly after both Emacs 22.1 and GPLv3 are done.
> Thanks!
> Sincerely yours,
> William
--
Alan Mackenzie (Ittersbach, Germany).
next prev parent reply other threads:[~2007-05-10 21:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 1:46 How to use c-style to comment a region? William Xue
2007-05-10 8:50 ` martin rudalics
2007-05-10 17:22 ` Stefan Monnier
2007-05-10 21:40 ` martin rudalics
2007-05-11 2:04 ` William Xue
2007-05-10 21:14 ` Alan Mackenzie [this message]
2007-05-11 2:10 ` William Xue
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070510223600.GA4176@muc.de \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=william.xue@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).