From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: bug#3269: 23.0.93; C-mode text highlighting Date: Mon, 18 May 2009 21:30:30 +0000 Message-ID: <20090518213030.GD12920@muc.de> References: <878wl1h5fw.fsf@ancient.thomaschristensen.org> <20090514213924.GB2413@muc.de> <20090518150643.GA12920@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1242682210 25580 80.91.229.12 (18 May 2009 21:30:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 May 2009 21:30:10 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Chong Yidong , 3269@emacsbugs.donarmstrong.com, Thomas Christensen , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 18 23:30:03 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M6APK-00077R-Qn for ged-emacs-devel@m.gmane.org; Mon, 18 May 2009 23:30:03 +0200 Original-Received: from localhost ([127.0.0.1]:36889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6APK-0002W6-3w for ged-emacs-devel@m.gmane.org; Mon, 18 May 2009 17:30:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6APF-0002Ut-Gl for emacs-devel@gnu.org; Mon, 18 May 2009 17:29:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6APA-0002Ql-30 for emacs-devel@gnu.org; Mon, 18 May 2009 17:29:56 -0400 Original-Received: from [199.232.76.173] (port=48630 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6AP9-0002QS-S5 for emacs-devel@gnu.org; Mon, 18 May 2009 17:29:51 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:2732 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 1M6AP9-0004wE-Ao for emacs-devel@gnu.org; Mon, 18 May 2009 17:29:51 -0400 Original-Received: (qmail 50221 invoked by uid 3782); 18 May 2009 21:29:49 -0000 Original-Received: from acm.muc.de (pD9E22FAC.dip.t-dialin.net [217.226.47.172]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 18 May 2009 23:29:45 +0200 Original-Received: (qmail 21937 invoked by uid 1000); 18 May 2009 21:30:30 -0000 Content-Disposition: inline In-Reply-To: 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-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110969 gmane.emacs.pretest.bugs:24464 Archived-At: Hi, Stefan! On Mon, May 18, 2009 at 03:53:42PM -0400, Stefan Monnier wrote: > > OK, here is a patch for half of the problem - it now fontifies a broken > > string in a #define properly > For some definition of "properly". The opening string quote (?\" or ?\') gets f-l-warning-face. The rest of the unclosed string (up to the first EOL which isn't escaped) gets f-l-string-face. Actually, that's not _quite_ "proper". A string with an even number of backslashes at an EOL is broken at that point, but the font locking doesn't show this (yet). I don't suppose that will bother you all that much. ;-) > > The second half of the problem is to fix it so that you don't have to > > type M-o M-o afterwards. Any change you'll let me do this before > > this week's pretest, Yidong? > I think this part is more important. I don't care much (if at all) > about how invalid code is highlighted. I agree it's important. I've got it working; what's more, the code doesn't advise any of the font lock functions for (>= emacs-major-version 22). I'll commit it tomorrow sometime. > Stefan -- Alan Mackenzie (Nuremberg, Germany).