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: Stefan Monnier
Subject: Re: cannot activate font-lock-mode
Date: Wed, 30 May 2007 20:39:05 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> I forgot to answer this previously, sorry.  I summarise.
> I had this in my local variables section:

>  mode: font-lock
>  font-lock-keywords: ("^\\S-.*:$")

> which worked in Emacs 21, but does not work any more in Emacs 22.  I
> solved the problem by writing instead:

>  mode: font-lock
>  font-lock-defaults: (("^\\S-.*:$"))

> I don't know whether this should be mentioned in the NEWS.

I must say that I don't know why this has changed.
Does the patch below fix your problem?


        Stefan


*** font-lock.el        16 mai 2007 12:01:08 -0400      1.317
--- font-lock.el        30 mai 2007 20:32:10 -0400      
***************
*** 1784,1790 ****
        ;; on other settings (e.g. font-lock-compile-keywords uses
        ;; font-lock-beginning-of-syntax-function).
        (set (make-local-variable 'font-lock-keywords)
!          (font-lock-eval-keywords keywords))
        ;; Local fontification?
        (while local
        (font-lock-add-keywords nil (car (car local)) (cdr (car local)))
--- 1784,1790 ----
        ;; on other settings (e.g. font-lock-compile-keywords uses
        ;; font-lock-beginning-of-syntax-function).
        (set (make-local-variable 'font-lock-keywords)
!          (font-lock-eval-keywords (or keywords font-lock-keywords)))
        ;; Local fontification?
        (while local
        (font-lock-add-keywords nil (car (car local)) (cdr (car local)))




reply via email to

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