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: Sat, 23 Sep 2006 22:10:22 -0400 Message-ID: References: <4503E44B.5020406@gmx.at> <45055F33.4030007@gmx.at> <450915CA.40108@gmx.at> <450DBA93.6000705@gmx.at> <450FB1B6.4070805@gmx.at> <45154AC7.5070209@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 1159063832 2124 80.91.229.2 (24 Sep 2006 02:10:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 24 Sep 2006 02:10:32 +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 Sun Sep 24 04:10:30 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 1GRJRq-00024h-Sd for sf-cc-mode-help@m.gmane.org; Sun, 24 Sep 2006 04:10:27 +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 305AB123D5; Sat, 23 Sep 2006 19:10:26 -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 1GRJRo-0004ey-Fw for cc-mode-help@lists.sourceforge.net; Sat, 23 Sep 2006 19:10:24 -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 1GRJRo-0000Z1-4H for cc-mode-help@lists.sourceforge.net; Sat, 23 Sep 2006 19:10:24 -0700 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GRJRm-00070E-1x; Sat, 23 Sep 2006 22:10:22 -0400 Original-To: martin rudalics In-reply-to: <45154AC7.5070209@gmx.at> (message from martin rudalics on Sat, 23 Sep 2006 16:55:03 +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:3874 gmane.emacs.devel:60155 Archived-At: We presume that major modes that introduce conflicting settings for `syntax-begin-function' and `font-lock-beginning-of-syntax-function' are on their own? I don't think it is right to set both, but I suppose the latter should take precedence. I made a M-/ error before. Please try this version of the patch. *** font-lock.el 16 Sep 2006 13:50:14 -0400 1.306 --- font-lock.el 23 Sep 2006 15:23:43 -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 font-lock-beginning-of-syntax-function ! syntax-begin-function))) ! (or (eq beg-function 'beginning-of-defun) ! (get beg-function '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