[Top][All Lists]
[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: |
Jorgen Schaefer |
Subject: |
Re: (global-font-lock-mode 1) does not bind `font-lock-keywords' in .emacs? |
Date: |
Mon, 12 Sep 2005 15:58:33 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>> The following .emacs:
>
>> (global-font-lock-mode 1)
>> (diary)
>
>> and an empty ~/diary file will cause Emacs (CVS from 2005-09-12)
>> to give an error that `font-lock-keywords' is unbound in
>> `normal-mode'.
>
> Can't reproduce "it", although I'm not sure exactly what I'm supposed
> to reproduce. I did the following:
>
> % touch ~/diary
> % emacs -q --eval '(progn (global-font-lock-mode 1) (diary))'
>
> and didn't get any error. What error do you get? Can you get a backtrace
> for it?
Well, this is curiosity I mentioned in my original email: The bug
only happens when this is in .emacs, not when it's called
otherwise. Even emacs -q -l .emacs doesn't give the error.
When the above code is all I have in my .emacs, my Emacs barfs at
startup:
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)
>> Adding a (message "Bound: %S" (boundp 'font-lock-keywords))
>> verifies that it is indeed unbound after the call to
>> `global-font-lock-mode'.
>
> I don't see why that should be a problem,
`normal-mode' checks whether `font-lock-mode' is set, and then
accesses `font-lock-keywords' - that gives the error above.
Sorry that I missed the backtrace in the original mail.
Greetings,
-- Jorgen
--
((email . "address@hidden") (www . "http://www.forcix.cx/")
(gpg . "1024D/028AF63C") (irc . "nick forcer on IRCnet"))