From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#3269: 23.0.93; C-mode text highlighting Date: Thu, 14 May 2009 21:39:24 +0000 Message-ID: <20090514213924.GB2413@muc.de> References: <878wl1h5fw.fsf@ancient.thomaschristensen.org> Reply-To: Alan Mackenzie , 3269@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1242337940 32620 80.91.229.12 (14 May 2009 21:52:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 May 2009 21:52:20 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: Thomas Christensen , 3269@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 14 23:52:12 2009 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 1M4iqa-0000Ye-Am for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 May 2009 23:52:12 +0200 Original-Received: from localhost ([127.0.0.1]:35746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4iqZ-0000wT-Kw for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 May 2009 17:52:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M4iqR-0000tQ-RK for bug-gnu-emacs@gnu.org; Thu, 14 May 2009 17:52:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M4iqN-0000na-SQ for bug-gnu-emacs@gnu.org; Thu, 14 May 2009 17:52:03 -0400 Original-Received: from [199.232.76.173] (port=52387 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4iqN-0000n6-8K for bug-gnu-emacs@gnu.org; Thu, 14 May 2009 17:51:59 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46220) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M4iqM-0007Jk-FN for bug-gnu-emacs@gnu.org; Thu, 14 May 2009 17:51:58 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4ELptgX030499; Thu, 14 May 2009 14:51:56 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n4ELj45u027828; Thu, 14 May 2009 14:45:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Alan Mackenzie Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 14 May 2009 21:45:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3269 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124233714226317 (code B ref -1); Thu, 14 May 2009 21:45:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 14 May 2009 21:39:02 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4ELctiW026295 for ; Thu, 14 May 2009 14:38:56 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:52184 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1M4idi-0000cD-OH for emacs-pretest-bug@gnu.org; Thu, 14 May 2009 17:38:54 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1M4idh-00059A-1b for emacs-pretest-bug@gnu.org; Thu, 14 May 2009 17:38:54 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:1399 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M4idg-00058t-9g for emacs-pretest-bug@gnu.org; Thu, 14 May 2009 17:38:52 -0400 Original-Received: (qmail 61309 invoked by uid 3782); 14 May 2009 21:38:49 -0000 Original-Received: from acm.muc.de (pD9E23C92.dip.t-dialin.net [217.226.60.146]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Thu, 14 May 2009 23:38:47 +0200 Original-Received: (qmail 6147 invoked by uid 1000); 14 May 2009 21:39:24 -0000 Content-Disposition: inline In-Reply-To: <878wl1h5fw.fsf@ancient.thomaschristensen.org> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Thu, 14 May 2009 17:52:03 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:27887 gmane.emacs.pretest.bugs:24424 Archived-At: On Wed, May 13, 2009 at 08:39:47AM +0200, Thomas Christensen wrote: > In c-mode type: > #define FOO "\ > foo\n\ > bar\n\ > " > Then place the cursor after foo\n\ and press RETURN for a new line. > The highlighting is now broken, and I can only restore it by reverting > the buffer. That's a bit vague, so let me fill it out for you. ;-) When you press RETURN as described, the new line you've just made lacks a backslash, hence terminates the macro. (Yes, I know you knew that.) #define FOO "\ foo\n\ bar\n\ " The "foo" line has lost its fontification, and this is the bug. I know what's causing it, and it _might_ be easily fixable. What's more, I don't this bug was in Emacs 22, so Chong Yidong would allow it to be fixed. :-) The "bar" line and what follows (which is no longer part of the macro) is so remote from being valid C syntax that no compaint about its fontification is reasonable. If you insert a backslash in the blank line, the bottom bit becomes correctly fontified again. The top bit needs you to type M-o M-o, as Andreas said, to restore its colour. This is because font lock, when triggered by a buffer change, only refontifies the current line and those below it. This is a longstanding problem with font lock which is difficult (though not impossible) to fix. Thanks for taking the trouble to report this bug. -- Alan Mackenzie (Nuremberg, Germany).