From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: font-locking and open parens in column zero Date: Sun, 24 Sep 2006 11:42:07 +0200 Message-ID: <451652EF.2060104@gmx.at> 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> 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 1159091120 20352 80.91.229.2 (24 Sep 2006 09:45:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 24 Sep 2006 09:45:20 +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 11:45:19 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 1GRQXs-0003ta-Qj for sf-cc-mode-help@m.gmane.org; Sun, 24 Sep 2006 11:45:09 +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 21C0812A29; Sun, 24 Sep 2006 02:45:08 -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 1GRQXp-0007t8-Oe for cc-mode-help@lists.sourceforge.net; Sun, 24 Sep 2006 02:45:05 -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 1GRQXo-0005dT-4v for cc-mode-help@lists.sourceforge.net; Sun, 24 Sep 2006 02:45:05 -0700 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.34) id 1GRQXl-0006Ig-GX for bug-cc-mode@gnu.org; Sun, 24 Sep 2006 05:45:01 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.52) id 1GRQbs-0002tT-Ju for bug-cc-mode@gnu.org; Sun, 24 Sep 2006 05:49:19 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1GRQbr-0002t8-Hp for bug-cc-mode@gnu.org; Sun, 24 Sep 2006 05:49:16 -0400 Original-Received: (qmail invoked by alias); 24 Sep 2006 09:44:56 -0000 Original-Received: from N716P014.adsl.highway.telekom.at (EHLO [62.47.33.110]) [62.47.33.110] by mail.gmx.net (mp018) with SMTP; 24 Sep 2006 11:44:56 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: rms@gnu.org In-Reply-To: X-Y-GMX-Trusted: 0 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: 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:3875 gmane.emacs.devel:60161 Archived-At: > I made a M-/ error before. Please try this version of the patch. It doesn't work for me provided I use something like (put font-lock-beginning-of-syntax-function 'font-lock-syntax-paren-check t) I'm probably too silly but using (put 'font-lock-beginning-of-syntax-function 'font-lock-syntax-paren-check t) instead and applying the patch below works for me. *** font-lock.el Sat Sep 23 11:08:56 2006 1.306 --- font-lock.el Sun Sep 24 10:52:26 2006 *************** *** 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 (eval 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