emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (global-font-lock-mode 1) does not bind `font-lock-keywords' in .ema


From: Stefan Monnier
Subject: Re: (global-font-lock-mode 1) does not bind `font-lock-keywords' in .emacs?
Date: Mon, 12 Sep 2005 11:05:29 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> Debugger entered--Lisp error: (void-variable font-lock-keywords)
>   normal-mode(t)
>   after-find-file(nil nil)
>   find-file-noselect-1(#<buffer diary> "~/diary" t nil "~/diary" (222092 
> 5634))
>   find-file-noselect("~/diary" t)

Oh, I see it.  The patch below should fix it.  Thanks for spotting this.


        Stefan


--- orig/lisp/files.el
+++ mod/lisp/files.el
@@ -1736,7 +1736,11 @@
       (hack-local-variables)))
   ;; Turn font lock off and on, to make sure it takes account of
   ;; whatever file local variables are relevant to it.
-  (when (and font-lock-mode (eq (car font-lock-keywords) t))
+  (when (and font-lock-mode
+             ;; Font-lock-mode (now in font-core.el) can be ON when
+             ;; font-lock.el still hasn't been loaded.
+             (boundp 'font-lock-keywords)
+             (eq (car font-lock-keywords) t))
     (setq font-lock-keywords (cadr font-lock-keywords))
     (font-lock-mode 1))
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]