From xemacs-m  Tue Jan  7 18:51:16 1997
Received: from alphatech.com (erebus.alphatech.com [198.112.236.2])
          by xemacs.cs.uiuc.edu (8.8.4/8.8.4) with SMTP
	  id SAA07011 for <xemacs-beta@xemacs.org>; Tue, 7 Jan 1997 18:51:07 -0600 (CST)
Received: from venus.alphatech.com by alphatech.com (4.1/SMI-4.1)
	id AA21720; Tue, 7 Jan 97 19:47:06 EST
Received: from euler.alphatech.com by venus.alphatech.com (4.1/SMI-4.1)
	id AA00338; Tue, 7 Jan 97 19:54:06 EST
Received: by euler.alphatech.com (5.x/SMI-SVR4)
	id AA12982; Tue, 7 Jan 1997 19:46:17 -0500
Sender: greg@euler.alphatech.com
To: xemacs-beta@xemacs.org
Subject: Re: anomalous font-locking in 19.15b4 ?  - solution
References: <9612272035.AA17037@euler.alphatech.com>
	<m27mm3xmry.fsf@altair.xemacs.org>
From: Greg Klanderman <greg@alphatech.com>
Date: 07 Jan 1997 19:46:16 -0500
In-Reply-To: Steven L Baur's message of 27 Dec 1996 21:26:09 -0800
Message-Id: <ugd8vh56zr.fsf_-_@euler.alphatech.com>
Lines: 33
X-Mailer: Gnus v5.2.40/XEmacs 19.15



>>>>> "sb" == Steven L Baur <steve@miranova.com> writes:
>>>>> "Greg" == Greg Klanderman <greg@alphatech.com> writes:
[:]
Greg> The behavior: Occasionally as I'm editing emacs-lisp, when
Greg> inserting or removing comments (";"), the changes in
Greg> fontification don't take place immediately but rather a few
Greg> keystrokes later.
sb> 
sb> I've never seen this.  Do you use lazy-lock?  (I use fast-lock because
sb> it is much faster).

No, just straight font-lock.

I figured out that this is caused by calling
(font-lock-use-default-maximal-decoration) after loading font-lock.  Setting the
variable font-lock-maximum-decoration to t before loading averts the problem.  

The problems can be simply reproduced by running xemacs -q, making a new buffer
foo.el, and inserting

;;; dummy function foo

(defun foo ()
  nil)

Now, M-x font-lock-mode.  Insert and remove comments in various places - they
are fontified fine.  Now do ESC-: (font-lock-use-default-maximal-decoration) and
try inserting a comment just above the defun.  Not fontified.  I've even seen
cases where things get fontified comment that shouldn't.

Greg

