>>>> Aidan wrote:
Aidan> C-x 4 F lazy-lock-pre-idle-fontify-windows RET , then copy the
Aidan> function into *scratch*, and put in a (message ) just after the
Aidan> "(while t " that says which frame is being fontified and
Aidan> whether the current buffer is the initial (current-buffer).
After doing that I went down the callstack and changed
(defun lazy-lock-maybe-fontify-frame (frame)
;; Fontify the given frame if we need to. We first check the
;; appropriate frame-modified-tick to avoid changing global state.
;(dp "fontify-frame %s" frame)
(let ((tick (frame-modified-tick frame))
(buf (current-buffer)) <--
(buf-name (buffer-name))) <--
;(dp tick)
(unless (eq tick (gethash frame lazy-lock-frame-modiff-cache))
(puthash frame tick lazy-lock-frame-modiff-cache)
;; We have to select the frame due to a bug in walk-windows in XEmacs
;; 21.4.
(with-selected-frame frame
(walk-windows #'lazy-lock-fontify-window 'no-minibuf frame))
(if (not (eq (current-buffer) buf)) (debug-print (concat
"Lazy-lock-maybe:" (frame-name) " Expected buf = " buf-name " but
got " (buffer-name)))) <--
)))
By inserting the lines marked with '<--' and using debug-print instead
of message. So now I can see things like:
Lazy-lock-maybe:XEmacs Expected buf = <BUFFER-NAME> but got
<NOT-SAME-BUFFER-NAME>
Conclusion: After walk-windows the buffer is changed. Now what!?
Yours
--
%% Mats