all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Jose Antonio Ortega Ruiz <jao@gnu.org>, 5350@debbugs.gnu.org
Cc: emacs-devel@gnu.org
Subject: bug#5350: 23.1.91; error in c++-mode highlighting/indentation
Date: Wed, 20 Jan 2010 13:03:59 +0000	[thread overview]
Message-ID: <20100120130359.GC2573__39798.1042777703$1263992995$gmane$org@muc.de> (raw)
In-Reply-To: <87tyuuujpo.fsf@newton.homeunix.net>

Hi, Jose,

On Sun, Jan 10, 2010 at 03:18:27PM +0100, Jose Antonio Ortega Ruiz wrote:

> Hi, this is a bugs somewhere in c-mode syntactic analyser (or so it
> seems). It happens to me in several circumstances; below i describe a
> simple instance for a C++ file (i've seen it happening also in pure C
> files).

> 1) Start emacs with -nw and -Q
> 2) Create a new C++ file, say test.cpp
> 3) Insert the following text:

> /* Copyright (C) 2009, 2100 Foo Industries */
>
> #include <libPlasma/c++/Pool.h>

> 4) When pressing the closing '>' an error occurs with the following
> backtrace:

I've just committed a patch which I think fixes this.  Either update your
bzr version of Emacs, or apply the following patch (and then byte-compile
cc-langs.el, cc-engine.el, and cc-mode.el):


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


-- 
Alan Mackenzie (Nuremberg, Germany).






      parent reply	other threads:[~2010-01-20 13:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-10 14:18 bug#5350: 23.1.91; error in c++-mode highlighting/indentation Jose Antonio Ortega Ruiz
2010-01-20 13:03 ` Alan Mackenzie
2010-01-20 15:24   ` Chong Yidong
2010-01-20 15:24   ` Chong Yidong
2010-01-20 13:03 ` 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='20100120130359.GC2573__39798.1042777703$1263992995$gmane$org@muc.de' \
    --to=acm@muc.de \
    --cc=5350@debbugs.gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jao@gnu.org \
    /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.