From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: hi-lock-mode doesn't work with emacs -Q. Date: Fri, 15 Jun 2007 17:51:51 -0400 Message-ID: References: <20070607092651.GA1710@muc.de> <20070615230452.GB3496@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1181944329 21838 80.91.229.12 (15 Jun 2007 21:52:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Jun 2007 21:52:09 +0000 (UTC) Cc: David Koppelman , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 15 23:52:08 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HzJi8-0005jz-78 for ged-emacs-devel@m.gmane.org; Fri, 15 Jun 2007 23:52:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HzJi7-0003yv-GS for ged-emacs-devel@m.gmane.org; Fri, 15 Jun 2007 17:52:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HzJi2-0003uQ-M7 for emacs-devel@gnu.org; Fri, 15 Jun 2007 17:51:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HzJi1-0003ss-5f for emacs-devel@gnu.org; Fri, 15 Jun 2007 17:51:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HzJi0-0003sY-UU for emacs-devel@gnu.org; Fri, 15 Jun 2007 17:51:57 -0400 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HzJi0-0007oq-IJ for emacs-devel@gnu.org; Fri, 15 Jun 2007 17:51:56 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 12A382CF327; Fri, 15 Jun 2007 17:51:56 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id D94813FE0; Fri, 15 Jun 2007 17:51:51 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id C543A6C8D8; Fri, 15 Jun 2007 17:51:51 -0400 (EDT) In-Reply-To: <20070615230452.GB3496@muc.de> (Alan Mackenzie's message of "Sat\, 16 Jun 2007 00\:04\:52 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:73015 Archived-At: > That patch will certainly make hi-lock work properly. However, are you > sure there is nothing else which can necessitate the enabling of the > after-change function? Also, there is nothing in the documentation > forbidding a hacker from changing font-lock-keywords directly, which > would cause font-lock to fail in other circumstances. Indeed. > It seems to me that this two-stage initialisation of f-l-mode brings a > lot of complexity for very little gain - The f-l-change-function can > never execute in the background and consume vast amounts of CPU usage. > It can only ever be called for the current buffer, and if Font Lock is > enabled, yet f-l-keywords hasn't been set, its runtime is negligible > anyway. The truth is: I haven't followed closely the introduction of font-core.el and how font-lock-mode and font-lock-mode-internal interact. So I'm not sure which part of font-core.el's behavior is important and which isn't, so I prefer to fix things from font-lock.el whre I understand the situation a bit better. > Or is there some good reason for this optimisation that I'm missing? If > not, I suggest that you simply remove this optimisation and always > install the after-change function when f-l-mode is started. That sounds great to me, but that amounts to removing font-core.el, so I'd need to hear from those who introduced font-core.el. Stefan