>     I see at least three solutions:
>     * check font-lock-keywords in font-lock-default-function for the compiled
>       empty value `(t nil)' and don't call font-lock-mode-internal for this
>       value;

> I'd rather intervene at an earlier stage so that it is not compiled at all.

> Why not?

>     * make the variable font-lock-keywords automatically buffer-local;

> That might be an ok solution.

OK, I think I found the problem:

in font-lock-default-fontify-buffer we do

    (unless font-lock-mode
      (font-lock-set-defaults))

where the idea is that if font-lock-mode is non-nil, it means font-lock is
already setup.  But now that we have split font-lock-mode and
font-lock-mode-internal, that's not necessarily the case.

I installed the patch below which should fix the problem.


        Stefan


--- font-lock.el        19 Dec 2005 23:18:17 -0000      1.287
+++ font-lock.el        22 Dec 2005 16:06:49 -0000
@@ -1001,8 +1001,7 @@
        (when verbose
          (format "Fontifying %s..." (buffer-name)))
       ;; Make sure we have the right `font-lock-keywords' etc.
-      (unless font-lock-mode
-       (font-lock-set-defaults))
+      (font-lock-set-defaults)
       ;; Make sure we fontify etc. in the whole buffer.
       (save-restriction
        (widen)


_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to