Jan Vroonhof <vroonhof(a)math.ethz.ch> writes in xemacs-beta(a)xemacs.org:
Raymond Toy <toy(a)rtp.ericsson.se> writes:
> No, it's not Window NT native. I've seen exactly the same things
> (except with vc-cc) on Solaris. This happened right after some
> changes that were made in revert-buffer or something like that. I
> vaguely remember someone complaining that font-lock appeared to get
> run twice on revert-buffer.
That would be me.
> Now it does't even get run once. :-(
This isn't true. I revert buffers every day (usually ChangeLogs) and
they get re-font-locked.
Can one of you guess step through that code and see where the
font-locking gets lost?
Yes, please do this. The code that handles buffer mode initialization
is extremely complex and I wouldn't be surprised if you are doing
something subtle in vc.el to break it. If someone wishes to take on a
smallish project that we will love you for years for doing, cleaning
up buffer initialization is the project.
...
I see what you mean now. I think you mean this stuff from
font-lock.el
;; If the buffer is about to be reverted, it won't be fontified
afterward.
(defun font-lock-revert-setup ()
(setq font-lock-fontified nil))
;; If the buffer has just been reverted, normally that turns off
;; Font Lock mode. So turn the mode back on if necessary.
;; sb 1999-03-03 -- The above comment no longer appears to be operative as
;; the first call to normal-mode *will* restore the font-lock state and
;; this call forces a second font-locking to occur when reverting a buffer,
;; which is wasteful at best.
;(defalias 'font-lock-revert-cleanup 'turn-on-font-lock)
(defun font-lock-revert-cleanup ())
a. Does undoing Steve's change help for your guys?
Undoing my patch is not the correct thing to do, but it would be
interesting to see if it has any effect. Once it is undone, also try
doing a `M-x revert-buffer' on a large ChangeLog file.
b. Why _does_ the font-lock-ing work for me? I am using
lazy-shot.el,
are you?
Because normal-mode restores the font lock state.
P.S. I am using lazy-shot.el that sim
I am using fast-lock.