* bug#5426: Fwd: c-neutralize-syntax-in-and-mark-CPP: Args out of range: 2, 3
2010-01-19 17:00 c-neutralize-syntax-in-and-mark-CPP: Args out of range: 2, 3 Yuan MEI
@ 2010-01-19 20:40 ` Juanma Barranquero
2010-01-20 10:40 ` Alan Mackenzie
1 sibling, 0 replies; 3+ messages in thread
From: Juanma Barranquero @ 2010-01-19 20:40 UTC (permalink / raw)
To: Emacs Bug Tracker
---------- Forwarded message ----------
From: Yuan MEI <yuan.mei.list@gmail.com>
Date: Tue, Jan 19, 2010 at 18:00
Subject: c-neutralize-syntax-in-and-mark-CPP: Args out of range: 2, 3
To: emacs-devel@gnu.org
Hi,
I am following the latest bzr revno: 99377 (emacs version
23.1.91.1). Start with `emacs -Q' and create a new .c file. Then
when I was trying to type `#include <stdio.h>', as soon as I typed the
leading `#', the error `c-neutralize-syntax-in-and-mark-CPP: Args out
of range: 2, 3' showed up. Any reason why this is happening? Also if
I turn on the font-lock in cc-mode, after the first time such error
occurred, the syntax highlighting went wrong (not completely off, but
not reliable).
Thanks,
ymei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c-neutralize-syntax-in-and-mark-CPP: Args out of range: 2, 3
2010-01-19 17:00 c-neutralize-syntax-in-and-mark-CPP: Args out of range: 2, 3 Yuan MEI
2010-01-19 20:40 ` bug#5426: Fwd: " Juanma Barranquero
@ 2010-01-20 10:40 ` Alan Mackenzie
1 sibling, 0 replies; 3+ messages in thread
From: Alan Mackenzie @ 2010-01-20 10:40 UTC (permalink / raw)
To: Yuan MEI; +Cc: emacs-devel
Hi,
On Tue, Jan 19, 2010 at 11:00:14AM -0600, Yuan MEI wrote:
> I am following the latest bzr revno: 99377 (emacs version
> 23.1.91.1). Start with `emacs -Q' and create a new .c file. Then
> when I was trying to type `#include <stdio.h>', as soon as I typed the
> leading `#', the error `c-neutralize-syntax-in-and-mark-CPP: Args out
> of range: 2, 3' showed up. Any reason why this is happening? Also if
> I turn on the font-lock in cc-mode, after the first time such error
> occurred, the syntax highlighting went wrong (not completely off, but
> not reliable).
> Thanks,
Thanks for such a high quality bug report.
I have committed a fix into savannah. Could you please update your bzr
Emacs and check that the bug is indeed fixed.
Alternatively, here is the patch which should fix it:
*** cc-defs.el~ 2010-01-19 13:24:48.000000000 +0000
--- cc-defs.el 2010-01-19 17:23:44.000000000 +0000
***************
*** 1217,1228 ****
;; This macro does a hidden buffer change.
`(progn
(c-put-char-property ,beg 'category 'c-cpp-delimiter)
! (c-put-char-property ,end 'category 'c-cpp-delimiter)))
(defmacro c-clear-cpp-delimiters (beg end)
;; This macro does a hidden buffer change.
`(progn
(c-clear-char-property ,beg 'category)
! (c-clear-char-property ,end 'category)))
(defsubst c-comment-out-cpps ()
;; Render all preprocessor constructs syntactically commented out.
--- 1217,1230 ----
;; This macro does a hidden buffer change.
`(progn
(c-put-char-property ,beg 'category 'c-cpp-delimiter)
! (if (< ,end (point-max))
! (c-put-char-property ,end 'category 'c-cpp-delimiter))))
(defmacro c-clear-cpp-delimiters (beg end)
;; This macro does a hidden buffer change.
`(progn
(c-clear-char-property ,beg 'category)
! (if (< ,end (point-max))
! (c-clear-char-property ,end 'category))))
(defsubst c-comment-out-cpps ()
;; Render all preprocessor constructs syntactically commented out.
> ymei
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 3+ messages in thread