[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7595: Infinite loop in cc-mode, or the coming of autumn

From: Daniel Colascione
Subject: bug#7595: Infinite loop in cc-mode, or the coming of autumn
Date: Sun, 06 Mar 2011 21:15:01 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20110303 Thunderbird/3.1.9

On 3/6/2011 9:00 PM, Chong Yidong wrote:
we will shall see if we just have to bite the bullet and continue
pretesting.  But if it does not trigger for realistic usage, I prefer
to leave matters as they are for 23.3---i.e. swapping one rare infloop
in 23.2 (Bug#7595) for a different one in 23.3 (the above).
On reflection, it's probably better to revert the original fix for 7595,
and go back to the (problematic) prior behavior.  As for the patch you
proposed, it doesn't look obvious and safe enough to include at this
late stage.

That's probably the safest course for now. The original patch adds a fair amount of logic, and I'm not entirely convinced myself it's the right thing.

This simple workaround fixes the immediate issue raised in bug 7595:

=== modified file 'lisp/progmodes/cc-cmds.el'
--- lisp/progmodes/cc-cmds.el   2010-10-31 11:54:02 +0000
+++ lisp/progmodes/cc-cmds.el   2010-12-09 00:18:26 +0000
@@ -2616,6 +2616,11 @@
              (setq count 0)

+             ((looking-at "^\\s-*#\\s-*$")
+              (setq count 0)
+              (end-of-line)
+              nil)
             (range                     ; point is within a literal.
               ;; sentence-flag is null => skip the entire literal.

reply via email to

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