From: Eli Zaretskii <eliz@gnu.org>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Automatically set the comment style to what we use
Date: Thu, 22 Jun 2017 15:03:00 -0000 [thread overview]
Message-ID: <83mv90uksa.fsf@gnu.org> (raw)
In-Reply-To: <CAH=s-PMwmTiFXsz6m4fnQfDUK-x0CQgDsn8GTQmGu9xDX3Urgg@mail.gmail.com> (message from Yao Qi on Thu, 22 Jun 2017 10:45:45 +0100)
> From: Yao Qi <qiyaoltc@gmail.com>
> Date: Thu, 22 Jun 2017 10:45:45 +0100
> Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
>
> On Fri, Jun 16, 2017 at 2:38 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > The development version of Emacs has a new feature, whereby one can
> > toggle the comment style and get the C style in C++ sources, the style
> > we use. (I got annoyed by having to manually type the comment
> > starting and ending sequences, so I asked the CC mode maintainer to
> > add this, and he just did.)
>
> How does this change affect the people writing code
> using new emacs? I still manually type comment
> starting and ending sequences every day.
Emacs has a command to open a comment: 'M-;' (without the quotes).
When you type this in C mode, Emacs inserts "/* */" and puts the
cursor inside the comment, so you could type the text. In C++ mode,
'M-;' inserts "// " and puts the cursor after it. With the above new
feature, you can now get "/* */" in C++ mode if you toggle the style.
Does that answer your question? (I've stopped typing the comment
starting and ending sequences long ago, I always use 'M-;'.)
next prev parent reply other threads:[~2017-06-22 15:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 13:39 Eli Zaretskii
2017-06-22 9:45 ` Yao Qi
2017-06-22 15:03 ` Eli Zaretskii [this message]
2017-06-22 15:04 ` Eli Zaretskii
2017-06-22 15:14 ` Yao Qi
2017-07-01 15:49 ` Eli Zaretskii
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=83mv90uksa.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@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.
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).