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: hi-lock-mode doesn't work with emacs -Q. Date: Thu, 7 Jun 2007 10:26:51 +0100 Message-ID: <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 1181203342 4725 80.91.229.12 (7 Jun 2007 08:02:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Jun 2007 08:02:22 +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 Thu Jun 07 10:02:20 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 1HwCwl-0001Oq-9w for ged-emacs-devel@m.gmane.org; Thu, 07 Jun 2007 10:02:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HwCwj-0000mN-UP for ged-emacs-devel@m.gmane.org; Thu, 07 Jun 2007 04:02:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HwCwf-0000kl-5j for emacs-devel@gnu.org; Thu, 07 Jun 2007 04:02:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HwCwY-0000jb-PW for emacs-devel@gnu.org; Thu, 07 Jun 2007 04:02:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HwCwY-0000jY-DV for emacs-devel@gnu.org; Thu, 07 Jun 2007 04:02:06 -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 1HwCwW-0005Dj-Ab for emacs-devel@gnu.org; Thu, 07 Jun 2007 04:02:05 -0400 Original-Received: (qmail 96975 invoked by uid 3782); 7 Jun 2007 08:01:48 -0000 Original-Received: from acm.muc.de (p54A3F8B8.dip.t-dialin.net [84.163.248.184]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Thu, 07 Jun 2007 10:01:46 +0200 Original-Received: (qmail 2357 invoked by uid 1000); 7 Jun 2007 09:26:51 -0000 Content-Disposition: inline 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:72404 Archived-At: Hi, Stefan! Start emacs -Q. (Emacs 22.1, of course). Visit a new file with: C-x C-f foo.txt . Type this: This file is foo.txt. . Enable hi-lock-mode and make "foo" a highlightable pattern: M-x hi-lock-mode C-x w h foo ; accept the default hi-yellow face. . This highlights the "foo" yellow, as expected. At the end of the line, type: foo . This new "foo" doesn't get highlighted. It should be. ######################################################################### Partial diagnosis: (i) The bug happens even when global-hi-lock-mode is enabled. (ii) after-change-functions is nil. It ought to be (jit-lock-after-change t). (iii) font-lock-mode is t. How can font-lock-mode be t, whilst at the same time there is no after-change function? Is this some optimisation in Font Lock mode that only sets after-change-functions when font-lock-keywords is non-nil? hi-lock.el doesn't seem to be violating Font Lock's proper calling conventions in any way. Stefan, I think you're the best person to fix this. -- Alan Mackenzie (Ittersbach, Germany).