From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#4835: 23.1; Improper `Invalid face reference' messages. Performance degraded. Date: Sat, 31 Oct 2009 12:09:37 -0700 Message-ID: References: <87ws2bfkyt.fsf@stupidchicken.com> Reply-To: Drew Adams , 4835@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1257017256 15252 80.91.229.12 (31 Oct 2009 19:27:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2009 19:27:36 +0000 (UTC) Cc: 4835@emacsbugs.donarmstrong.com To: "'Chong Yidong'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 31 20:27:28 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N4Jbj-0004pd-ET for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Oct 2009 20:27:28 +0100 Original-Received: from localhost ([127.0.0.1]:41510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4Jbi-0007QN-Tf for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Oct 2009 15:27:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4Jbe-0007QH-MV for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2009 15:27:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4Jba-0007Pd-2R for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2009 15:27:22 -0400 Original-Received: from [199.232.76.173] (port=52680 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4JbZ-0007Pa-QK for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2009 15:27:17 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43566) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N4JbZ-0001W7-9R for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2009 15:27:17 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9VJRFi4020095; Sat, 31 Oct 2009 12:27:15 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n9VJF4Ob018621; Sat, 31 Oct 2009 12:15:04 -0700 Resent-Date: Sat, 31 Oct 2009 12:15:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 31 Oct 2009 19:15:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4835 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4835-submit@emacsbugs.donarmstrong.com id=B4835.125701626218382 (code B ref 4835); Sat, 31 Oct 2009 19:15:04 +0000 Original-Received: (at 4835) by emacsbugs.donarmstrong.com; 31 Oct 2009 19:11:02 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from rgminet12.oracle.com (rcsinet12.oracle.com [148.87.113.124]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9VJB1tI018378 for <4835@emacsbugs.donarmstrong.com>; Sat, 31 Oct 2009 12:11:02 -0700 Original-Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n9VJAPPD006612 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 31 Oct 2009 19:10:27 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n9VFrml3020860; Sat, 31 Oct 2009 19:11:30 GMT Original-Received: from abhmt012.oracle.com by acsmt354.oracle.com with ESMTP id 20745123891257016179; Sat, 31 Oct 2009 12:09:39 -0700 Original-Received: from dradamslap1 (/141.144.80.25) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 31 Oct 2009 12:09:39 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcpaXFfM3Z1bS3UJRsu3nuykrubu7gAAECJQ In-Reply-To: <87ws2bfkyt.fsf@stupidchicken.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt355.oracle.com [141.146.40.155] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090209.4AEC8BBC.007E:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 31 Oct 2009 15:27:22 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32316 Archived-At: > > 2. The code I had seems nevertheless to "work", in the sense that it > > does what I expect (highlights the column). Except that it > > logs those messages and the performance is terrible. > > I suspect this is because parts of font-lock do this: > (if (stringp matcher) > (re-search-forward matcher end t) > (funcall matcher end))) > > while other parts do this: > (font-lock-eval-keywords (if (fboundp keywords) > (funcall keywords) > (eval keywords))))) > > If `matcher' is a lambda expression, the first will work as expected, > because you can pass a lambda to funcall. But the second will do the > wrong thing. > > We should probably fix the code to check for and disallow lambda > expressions (and the docs), assuming not too much external code is > relying on the unintended behavior. This part of the thread is only tangentially related to the bug report, but anyway: Why is it necessary to restrict the function to a symbol - why disallow lambda forms? IOW, why can't we use (functionp keywords) instead of (fboundp keywords)? After all, we're just calling `funcall', and all `funcall' requires of its function arg is that it be `functionp'. Is there a real reason for the current restriction to symbols? Besides, as I noted in a previous mail, the font-lock code itself apparently uses a lambda form in this way. Just asking. I don't claim to understand the font-lock code.