* c-neutralize-syntax-in-and-mark-CPP: Args out of range: 2, 3
@ 2010-01-19 17:00 Yuan MEI
2010-01-20 10:40 ` Alan Mackenzie
0 siblings, 1 reply; 2+ messages in thread
From: Yuan MEI @ 2010-01-19 17:00 UTC (permalink / raw)
To: emacs-devel
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] 2+ 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-20 10:40 ` Alan Mackenzie
0 siblings, 0 replies; 2+ 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] 2+ messages in thread
end of thread, other threads:[~2010-01-20 10:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19 17:00 c-neutralize-syntax-in-and-mark-CPP: Args out of range: 2, 3 Yuan MEI
2010-01-20 10:40 ` Alan Mackenzie
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).