From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eli Zaretskii <eliz@gnu.org>
Cc: acm@muc.de, 11841@debbugs.gnu.org, vadimsks@gmail.com
Subject: bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles
Date: Sun, 08 Jul 2012 10:50:03 -0400 [thread overview]
Message-ID: <jwvwr2exqbj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83vchzklgc.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 08 Jul 2012 05:58:43 +0300")
>> > Just as an observation, (forward-comment -1) doesn't move back over a ^M.
>>
>> Why should it? It's not a whitespace, and while it has "comment end"
>> syntax, it does not have a matching comment-start.
>>
>> I think you should give it whitespace syntax.
>> Currently "foo // bar ^M baz ^J" is treated in CC-mode as "foo <comment>
>> baz", which I think is wrong.
> Perhaps so, but in the file in question you have ^M^J with northing
> between them. So a lone ^M is not an issue here.
Yes it is: without a "//" in front of it, a ^M is not a comment-ender
and syntax.c then treats it as a "strange char" (for \n used as comment
ender, syntax.c knows to treat it as whitespace when there's no
matching comment-starter, but that's a special case, for other chars
this is not so, e.g. for pascal's } it would be wrong to treat it as
whitespace).
Stefan
next prev parent reply other threads:[~2012-07-08 14:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 0:51 bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles Vadim K
2012-07-02 16:42 ` Eli Zaretskii
2012-07-02 18:22 ` Stefan Monnier
2012-07-07 21:10 ` Alan Mackenzie
2012-07-07 21:53 ` Stefan Monnier
2012-07-08 2:58 ` Eli Zaretskii
2012-07-08 14:50 ` Stefan Monnier [this message]
2012-07-08 15:34 ` Alan Mackenzie
2012-07-08 23:07 ` Stefan Monnier
2012-07-15 17:02 ` Alan Mackenzie
2012-07-15 22:56 ` Stefan Monnier
2012-07-20 21:10 ` Alan Mackenzie
2012-07-22 9:54 ` Stefan Monnier
2012-07-25 20:58 ` Vadim K
2012-12-11 19:24 ` Alan Mackenzie
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=jwvwr2exqbj.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=11841@debbugs.gnu.org \
--cc=acm@muc.de \
--cc=eliz@gnu.org \
--cc=vadimsks@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).