From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#5350: 23.1.91; error in c++-mode highlighting/indentation Date: Wed, 20 Jan 2010 13:03:59 +0000 Message-ID: <20100120130359.GC2573__39798.1042777703$1263992995$gmane$org@muc.de> References: <87tyuuujpo.fsf@newton.homeunix.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263992996 28458 80.91.229.12 (20 Jan 2010 13:09:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Jan 2010 13:09:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jose Antonio Ortega Ruiz , 5350@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 20 14:09:48 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NXaJf-0008O4-Pe for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jan 2010 14:09:48 +0100 Original-Received: from localhost ([127.0.0.1]:42573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXaJg-0001VU-JP for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jan 2010 08:09:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXaJR-0001Rv-Tq for bug-gnu-emacs@gnu.org; Wed, 20 Jan 2010 08:09:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXaJN-0001Qk-AW for bug-gnu-emacs@gnu.org; Wed, 20 Jan 2010 08:09:33 -0500 Original-Received: from [199.232.76.173] (port=51947 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXaJN-0001Qc-4I for bug-gnu-emacs@gnu.org; Wed, 20 Jan 2010 08:09:29 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34748) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NXaJM-0005o0-Qy for bug-gnu-emacs@gnu.org; Wed, 20 Jan 2010 08:09:28 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NXa8H-0006H1-Rr; Wed, 20 Jan 2010 07:58:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Jan 2010 12:58:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5350 X-Emacs-PR-Package: emacs,cc-mode X-Emacs-PR-Keywords: Original-Received: via spool by 5350-submit@debbugs.gnu.org id=B5350.126399225224107 (code B ref 5350); Wed, 20 Jan 2010 12:58:01 +0000 Original-Received: (at 5350) by debbugs.gnu.org; 20 Jan 2010 12:57:32 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXa7n-0006Gm-Mc for submit@debbugs.gnu.org; Wed, 20 Jan 2010 07:57:32 -0500 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXa7l-0006Gh-Hq for 5350@debbugs.gnu.org; Wed, 20 Jan 2010 07:57:30 -0500 Original-Received: (qmail 6763 invoked by uid 3782); 20 Jan 2010 12:57:23 -0000 Original-Received: from acm.muc.de (pD9E234F0.dip.t-dialin.net [217.226.52.240]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Wed, 20 Jan 2010 13:57:22 +0100 Original-Received: (qmail 16916 invoked by uid 1000); 20 Jan 2010 13:03:59 -0000 Content-Disposition: inline In-Reply-To: <87tyuuujpo.fsf@newton.homeunix.net> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -2.6 (--) Resent-Date: Wed, 20 Jan 2010 07:58:01 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34564 Archived-At: 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 > 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).