[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles
From: |
Alan Mackenzie |
Subject: |
bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles |
Date: |
Sun, 15 Jul 2012 17:02:12 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hello again, Stefan.
On Sun, Jul 08, 2012 at 07:07:41PM -0400, Stefan Monnier wrote:
> > I've tried setting ^M's syntax to WS. The code no longer loops.
> > However, ^M is syntactically a comment ender so that it can end a
> > comment when selective-display is active.
> ^M is only a comment ender when selective-display is active. So only
> set its syntax to comment-end when selective-display is active.
Is that possible? If so, is it possible without introducing horrible
couplings between disparate bits of code..
> Better yet: stop supporting selective-display.
That's more a decision for the Emacs boss. selective-display is still
supported in Emacs 24, according to the elisp manual.
> > Would it not be better for ^M to be treated as WS by syntax.c? The
> > current problem isn't really a CC Mode one; mixed line enders could
> > happen in a file of any major mode. Emacs really ought to treat all
> > line endings the same.
> It does: it maps them all to ^J.
It does not, except in normal cases. When most, but not all, line
endings are CRLFs, they are not converted to LFs. (To do so would lose
information.)
We could have philosophical arguments about whether a CRLF really is a
line ending in this case. I think, that in practice, an MS-DOS source
file containing an isolated LF (created by some other editor) is the
normal abuse-case for this scenario. It is causing problems.
> ^M in a buffer is not a line-ender (except for the oddball case of
> selective-display which is a feature that needs to die).
How about treating ^M^J as WS in syntax.c? At the very least, in
forward-comment?
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
- bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles, Vadim K, 2012/07/02
- bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles, Eli Zaretskii, 2012/07/02
- bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles, Stefan Monnier, 2012/07/02
- bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles, Alan Mackenzie, 2012/07/07
- bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles, Stefan Monnier, 2012/07/07
- bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles, Eli Zaretskii, 2012/07/07
- bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles, Stefan Monnier, 2012/07/08
- bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles, Alan Mackenzie, 2012/07/08
- bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles, Stefan Monnier, 2012/07/08
- bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles,
Alan Mackenzie <=
- bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles, Stefan Monnier, 2012/07/15
bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles, Alan Mackenzie, 2012/07/20