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

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

Re: cannot activate font-lock-mode


From: Francesco Potorti`
Subject: Re: cannot activate font-lock-mode
Date: Fri, 20 Apr 2007 11:53:01 +0200

> > # font-lock-keywords : ("^\\s-*:0" "##+")
> > # End:
> >
> > Now, when desktop.el loads it, it asks if I want to apply the
> > font-lock-keywords customisation, because it is risky (is it?).
>
>The question is asked by `hack-local-variables-confirm'.

Fine.

> > I
> > answer y, but I get the message:
> >  Toggling font-lock-mode off; better pass an explicit argument.
>
>This is done in `hack-one-local-variable' where
>
>            (funcall mode)
>
>simply executes `font-lock-mode' which toggles font-lock mode off since
>it does not get an argument.

Why does it do that?  Shouldn't it simply set font-lock-keywords to the
value I specified?  This is what happened in Emacs 21, as far as I can
tell.

> > I then again do M-x font-lock-mode RET, and it says
> >  Font-Lock mode enabled
> > but I still see no colours.
>
>Look at the value of `font-lock-keywords' in this buffer - it's probably
>(t nil).  

Yes, it is.

>You should modify this either by setting `font-lock-defaults'
>or via `font-lock-add-keywords' or `font-lock-remove-keywords'.

So, what is now the recommended way to set file-specific font-lock
keywords using file-local variables?  If this has changed, it should be
specified in the NEWS.  I can write an entry once I understand the
answer to my questions above.




reply via email to

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