[plug] global-font-lock-mode not activating colourisation when executed from .emacs
Russell Steicke
r.steicke at bom.gov.au
Tue Feb 1 22:05:19 WST 2005
On Tue, Feb 01, 2005 at 05:49:35PM +0800, Cameron Patrick wrote:
> David Buddrige wrote:
>
> > However, being a lazy sort, I really would prefer it if emacs would
> > activate this feature for me, rather than my having to type it every time I
> > load my perl source code, so I edited my .emacs file, and added the line:
> >
> > (setq global-font-lock-mode t)
>
> That's not the why my .emacs has it; I have a snippet that looks like:
>
> (custom-set-variables
> ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
> ;; Your init file should contain only one such instance.
> '(c-basic-offset 8)
> [...snip...]
> '(global-font-lock-mode t nil (font-lock))
> [...snip...]
> '(user-mail-address "cameron at patrick.wattle.id.au"))
>
> I believe that I enabled it using M-x customize and drilling down
> through the utterly counterintuitive menu system.
Or just this:
(global-font-lock-mode 1)
Your problem is that global-font-mode has both a function binding and
a variable binding. The code that does font locking seems to set the
global-font-lock-mode variable, but not read it. So you need to call
the function to turn on fonts.
You can get the documentation for the global-font-lock-mode function
with
C-h f global-font-lock-mode RET
And for the global-font-lock-mode variable with
C-h v global-font-lock-mode RET
--
Russell Steicke
-- Fortune says:
You can destroy your now by worrying about tomorrow.
-- Janis Joplin
More information about the plug
mailing list