all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Is this a bug of cc-mode?
  2013-05-24 18:14 Is this a bug of cc-mode? Jun
@ 2013-05-24 15:01 ` Alan Mackenzie
  2013-05-25 11:19 ` Alan Mackenzie
  1 sibling, 0 replies; 4+ messages in thread
From: Alan Mackenzie @ 2013-05-24 15:01 UTC (permalink / raw)
  To: Jun; +Cc: emacs-devel

Hello, 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---------------

Yes, this is a bug.  There is a failure setting case-folding somewhere,
with the result that "LONG" is almost, but not quite, interpreted as the
keyword "long".

Thanks for taking the trouble to report it.  I'll get a fix out soon.

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Is this a bug of cc-mode?
@ 2013-05-24 18:14 Jun
  2013-05-24 15:01 ` Alan Mackenzie
  2013-05-25 11:19 ` Alan Mackenzie
  0 siblings, 2 replies; 4+ messages in thread
From: Jun @ 2013-05-24 18:14 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

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---------------

[-- Attachment #2: Type: text/html, Size: 692 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is this a bug of cc-mode?
  2013-05-24 18:14 Is this a bug of cc-mode? Jun
  2013-05-24 15:01 ` Alan Mackenzie
@ 2013-05-25 11:19 ` Alan Mackenzie
  2013-05-28  9:41   ` Jun
  1 sibling, 1 reply; 4+ messages in thread
From: Alan Mackenzie @ 2013-05-25 11:19 UTC (permalink / raw)
  To: Jun; +Cc: emacs-devel

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).



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is this a bug of cc-mode?
  2013-05-25 11:19 ` Alan Mackenzie
@ 2013-05-28  9:41   ` Jun
  0 siblings, 0 replies; 4+ messages in thread
From: Jun @ 2013-05-28  9:41 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

On 05/25/2013 11:19 AM, Alan Mackenzie wrote:
> 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.
>
>
>
It works well now with your patch. Thank you.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-28  9:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-24 18:14 Is this a bug of cc-mode? Jun
2013-05-24 15:01 ` Alan Mackenzie
2013-05-25 11:19 ` Alan Mackenzie
2013-05-28  9:41   ` Jun

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.