bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Stefan Monnier
Subject: bug#11841: 24.1; emacs hangs when opening cpp file with mixed eol styles
Date: Sun, 22 Jul 2012 05:54:12 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> --- a/cc-engine.el    Sun Apr 22 09:42:29 2012 +0000
> +++ b/cc-engine.el    Fri Jul 20 20:52:39 2012 +0000
> @@ -1455,7 +1455,12 @@
>           (not (bobp))
 
>           (if (let (open-paren-in-column-0-is-defun-start)
> -               (forward-comment -1))
> +               (or (forward-comment -1)
> +                   ;; Cope specifically with ^M^J here -
> +                   ;; forward-comment gets stuck at ^Ms.
> +                   (and (eq (char-before) ?\r)
> +                        (progn (backward-char)
> +                               (forward-comment -1)))))
>               (if (looking-at "\\*/")
>                   ;; Emacs <= 20 and XEmacs move back over the
>                   ;; closer of a block comment that lacks an opener.

Hard to believe you'd prefer such an ugly workaround instead of just
fixing the syntax of ^M.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]