help-gnu-emacs
[Top][All Lists]
Advanced

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

font-lock-add-keywords in text-mode


From: NAKAMURA Toshikazu
Subject: font-lock-add-keywords in text-mode
Date: Tue, 07 Sep 2004 18:15:14 +0900
User-agent: Wanderlust/2.11.30 (Wonderwall) Emacs/21.3 Mule/5.0 (SAKAKI)

I would like to highlight some characters in text-mode, but it looks
like font-lock-add-keywords fails to work when font-lock-defaults's
value is nil as in text-mode. If one sets an appropriate value for
font-lock-defaults using hooks or something, it works but I wonder if
this is really what one is supposed to do.

(add-hook 'text-mode-hook
          (lambda ()
            (setq font-lock-defaults '(nil nil nil nil nil))))

It seems to me that font-lock-add-keywords should work even if
font-lock-defaults's value is nil. If not, is there a better
workaround? I am using GNU Emacs 21.3.50.1 (i386-mingw-nt5.0.2195) of
2004-09-01 on MS Windows 2000.

Thanks.
-- 
NAKAMURA Toshikazu



reply via email to

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