From: Alan Mackenzie <acm@muc.de>
To: Yuan MEI <yuan.mei.list@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: c-neutralize-syntax-in-and-mark-CPP: Args out of range: 2, 3
Date: Wed, 20 Jan 2010 10:40:57 +0000 [thread overview]
Message-ID: <20100120104057.GB2573@muc.de> (raw)
In-Reply-To: <c10314911001190900t37802ab8s95d38be24ca77fcc@mail.gmail.com>
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).
prev parent reply other threads:[~2010-01-20 10:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100120104057.GB2573@muc.de \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=yuan.mei.list@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.