From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: hi-lock-mode doesn't work with emacs -Q. Date: Fri, 8 Jun 2007 12:11:25 +0100 Message-ID: <20070608111125.GB1509@muc.de> References: <20070607092651.GA1710@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1181296275 1186 80.91.229.12 (8 Jun 2007 09:51:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 8 Jun 2007 09:51:15 +0000 (UTC) Cc: David Koppelman , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 08 11:51:11 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 1Hwb7d-0002DM-HR for ged-emacs-devel@m.gmane.org; Fri, 08 Jun 2007 11:51:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hwb7c-0003tV-UW for ged-emacs-devel@m.gmane.org; Fri, 08 Jun 2007 05:51:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hwb2x-0007Rf-PR for emacs-devel@gnu.org; Fri, 08 Jun 2007 05:46:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hwb2w-0007RN-OE for emacs-devel@gnu.org; Fri, 08 Jun 2007 05:46:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hwb2w-0007RF-2i for emacs-devel@gnu.org; Fri, 08 Jun 2007 05:46:18 -0400 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hwb2v-0005rC-Eb for emacs-devel@gnu.org; Fri, 08 Jun 2007 05:46:17 -0400 Original-Received: (qmail 73362 invoked by uid 3782); 8 Jun 2007 09:46:14 -0000 Original-Received: from acm.muc.de (p54A3F596.dip.t-dialin.net [84.163.245.150]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Fri, 08 Jun 2007 11:46:11 +0200 Original-Received: (qmail 4177 invoked by uid 1000); 8 Jun 2007 11:11:25 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: FreeBSD 4.6-4.9 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:72482 Archived-At: Hi, Stefan. On Thu, Jun 07, 2007 at 09:22:40AM -0400, Stefan Monnier wrote: > > How can font-lock-mode be t, whilst at the same time there is no > > after-change function? > Because font-lock-mode-internal is not enabled. > > Is this some optimisation in Font Lock mode that only sets > > after-change-functions when font-lock-keywords is non-nil? > Yes. > > hi-lock.el doesn't seem to be violating Font Lock's proper calling > > conventions in any way. > Indeed. It's that the `font-lock-mode' function has changed meaning from > Emacs-21 to Emacs-22. I'm not yet sure how best to fix it. How about always enabling the pertinent after-change function (there are just two, now, aren't there?), and wrapping it in the test currently in font-lock-default-function at the comment ;; Only do hard work if the mode has specified stuff in ;; `font-lock-defaults'. ? The loss in performance for un-font-locked buffers will be negligible, surely? > Stefan -- Alan.