From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.pretest.bugs,gmane.emacs.devel Subject: Re: [simon.marshall@misys.com: Font Lock on-the-fly misfontification in C++] Date: Mon, 31 Jul 2006 23:04:19 +0100 Message-ID: <20060731220419.GF1271@muc.de> References: <20060723142630.GB1433@muc.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1154380056 27948 80.91.229.2 (31 Jul 2006 21:07:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Jul 2006 21:07:36 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-pretest-bug@gnu.org, "Marshall, Simon" , emacs-devel@gnu.org Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Mon Jul 31 23:07:32 2006 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G7exi-0000px-At for sf-cc-mode-help@m.gmane.org; Mon, 31 Jul 2006 23:06:06 +0200 Original-Received: from sc8-sf-list1-new.sourceforge.net (unknown [10.3.1.93]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 776AE124CE; Mon, 31 Jul 2006 14:06:05 -0700 (PDT) Original-Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1G7exZ-0006P9-An for cc-mode-help@lists.sourceforge.net; Mon, 31 Jul 2006 14:05:59 -0700 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by mail.sourceforge.net with esmtps (TLSv1:RC4-SHA:128) (Exim 4.44) id 1G7exY-0003Cf-LP for cc-mode-help@lists.sourceforge.net; Mon, 31 Jul 2006 14:05:57 -0700 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.34) id 1G7exX-0001Pt-4Y for bug-cc-mode@gnu.org; Mon, 31 Jul 2006 17:05:55 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.52) id 1G7f0G-0000uz-VZ for bug-cc-mode@gnu.org; Mon, 31 Jul 2006 17:08:45 -0400 Original-Received: from [193.149.48.1] (helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G7f0G-0000uo-Dr for bug-cc-mode@gnu.org; Mon, 31 Jul 2006 17:08:44 -0400 Original-Received: (qmail 84661 invoked from network); 31 Jul 2006 21:05:51 -0000 Original-Received: from acm.muc.de (HELO localhost.localdomain) (Debian-exim@193.149.49.134) by mail.muc.de with SMTP; 31 Jul 2006 21:05:51 -0000 Original-Received: from acm by localhost.localdomain with local (Exim 4.50) id 1G7fs3-0002pY-Oe; Mon, 31 Jul 2006 23:04:19 +0100 Original-To: Stefan Monnier Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on monty-python X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=failed version=3.0.4 X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 1.0 FORGED_RCVD_HELO Received: contains a forged HELO X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.8 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: cc-mode-help-bounces@lists.sourceforge.net Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.emacs.cc-mode.general:3666 gmane.emacs.pretest.bugs:13232 gmane.emacs.devel:57878 Archived-At: Hi, Stefan! On Mon, Jul 24, 2006 at 10:35:08AM -0400, Stefan Monnier wrote: > The patch below seems to fix number 2 and 3 for me. Someone who > understands cc-fonts.el better than me and thus knows where the two > "public XXX" lines are handled could probably do a similar adjustment > for them. At the very least, this isn't suitable for the CC Mode repository, since font-lock-multiline hasn't (yet?) been implemented in XEmacs or older GNU Emacsen. I don't know cc-fonts.el that well myself, yet, but I get the feeling that putting in f-l-multiline properties like this is, at best, only going to converge gradually on a working solution [to the problem of CC Mode lines being fontified out of context]. How will we know when every case has been covered? As I've said once or twice before, I'd prefer to calculate the f-l change region explicitly at each change. > > Stefan > > --- orig/lisp/progmodes/cc-fonts.el > +++ mod/lisp/progmodes/cc-fonts.el > @@ -1111,6 +1111,10 @@ > ;; False alarm. Return t to go on to the next check. > t > > + (let ((beg (max (1- match-pos) (point-min)))) > + (if (< beg (line-beginning-position)) > + (put-text-property beg (point) 'font-lock-multiline t))) > + > (if (eq decl-or-cast 'cast) > ;; Save the position after the previous cast so we can feed > ;; it to `c-forward-decl-or-cast-1' in the next round. That -- Alan. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV