From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: William Xue <william.xue@gmail.com>, emacs-devel@gnu.org
Subject: Re: How to use c-style to comment a region?
Date: Thu, 10 May 2007 23:40:24 +0200 [thread overview]
Message-ID: <46439148.4040505@gmx.at> (raw)
In-Reply-To: <jwv3b24r3vo.fsf-monnier+emacs@gnu.org>
> I'm not sure I understand the problem (and hence the solution). Can you
> show me a recipe to reproduce this problem?
Sorry for being cryptic. With emacs -Q customize `comment-style' to box
or box-multi. In *scratch* insert
(foo bar baz)
set the region around bar and do `comment-region'. Gets you
(foo ;; bar ;; baz)
instead of
(foo ;; bar ;;
baz)
Responsible is the
(when block (unless ce (setq ce (comment-string-reverse cs))))
line in `comment-region-internal' which makes the subsequent
(unless (or ce (eolp)) (insert "\n") (indent-according-to-mode))
fail. Obviously it fails in the cpp example of the OP as well.
next prev parent reply other threads:[~2007-05-10 21:40 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 [this message]
2007-05-11 2:04 ` William Xue
2007-05-10 21:14 ` Alan Mackenzie
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=46439148.4040505@gmx.at \
--to=rudalics@gmx.at \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--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).