From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: font-locking and open parens in column zero Date: Fri, 22 Sep 2006 23:34:23 -0400 Message-ID: References: <4503E44B.5020406@gmx.at> <45055F33.4030007@gmx.at> <450915CA.40108@gmx.at> <450DBA93.6000705@gmx.at> <450FB1B6.4070805@gmx.at> Reply-To: rms@gnu.org 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 1158982483 5591 80.91.229.2 (23 Sep 2006 03:34:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 23 Sep 2006 03:34:43 +0000 (UTC) Cc: bug-cc-mode@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Sat Sep 23 05:34:40 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 1GQyHn-0001Oc-Ev for sf-cc-mode-help@m.gmane.org; Sat, 23 Sep 2006 05:34:39 +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 7ECC2FB39; Fri, 22 Sep 2006 20:34:38 -0700 (PDT) Original-Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1GQyHk-00046l-5L for cc-mode-help@lists.sourceforge.net; Fri, 22 Sep 2006 20:34:36 -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 1GQyHi-0004lI-Rk for cc-mode-help@lists.sourceforge.net; Fri, 22 Sep 2006 20:34:36 -0700 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GQyHX-0005PU-HC; Fri, 22 Sep 2006 23:34:23 -0400 Original-To: martin rudalics In-reply-to: <450FB1B6.4070805@gmx.at> (message from martin rudalics on Tue, 19 Sep 2006 11:00:38 +0200) X-Spam-Score: 0.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 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:3871 gmane.emacs.devel:60123 Archived-At: What would you think of something like this? *** font-lock.el 16 Sep 2006 13:50:14 -0400 1.306 --- font-lock.el 22 Sep 2006 17:29:23 -0400 *************** *** 1646,1654 **** (cons t (cons keywords (mapcar 'font-lock-compile-keyword keywords)))) (if (and (not syntactic-keywords) ! (eq (or syntax-begin-function ! font-lock-beginning-of-syntax-function) ! 'beginning-of-defun) (not beginning-of-defun-function)) ;; Try to detect when a string or comment contains something that ;; looks like a defun and would thus confuse font-lock. --- 1646,1656 ---- (cons t (cons keywords (mapcar 'font-lock-compile-keyword keywords)))) (if (and (not syntactic-keywords) ! (let ((beg-function ! (or syntax-begin-function ! font-lock-beginning-of-syntax-function))) ! (or (eq beg-function 'beginning-of-defun) ! (get beginning-of-defun 'font-lock-syntax-paren-check))) (not beginning-of-defun-function)) ;; Try to detect when a string or comment contains something that ;; looks like a defun and would thus confuse font-lock. ------------------------------------------------------------------------- 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