[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is this a bug of cc-mode?
From: |
Alan Mackenzie |
Subject: |
Re: Is this a bug of cc-mode? |
Date: |
Sat, 25 May 2013 11:19:18 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi, Jun.
On Fri, May 24, 2013 at 06:14:23PM +0000, Jun wrote:
> emacs -Q
> C-x C-f /tmp/tmp.c (should be in c-mode)
> Copy the following c code and paste it to the new buffer, then emacs
> freezes.
> -------------xxxx-----------------
> LONG Rounding(
> IN PRTMP_ADAPTER pAd,
> IN LONG Integer,
> IN LONG Fraction,
> IN LONG DenominatorOfTssiRatio)
> -------------xxxx---------------
I think the following patch fixes things. Could you try it out, please,
and let me know whether it works properly. Thanks!
diff -r 5913f459a611 cc-mode.el
--- a/cc-mode.el Sat May 25 10:56:44 2013 +0000
+++ b/cc-mode.el Sat May 25 11:15:35 2013 +0000
@@ -1082,7 +1082,7 @@
;; This typically sets `syntax-table' properties.
(setq c-just-done-before-change nil)
- (c-save-buffer-state ()
+ (c-save-buffer-state (case-fold-search)
;; When `combine-after-change-calls' is used we might get calls
;; with regions outside the current narrowing. This has been
;; observed in Emacs 20.7.
--
Alan Mackenzie (Nuremberg, Germany).