[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with font-lock-add-keywords
From: |
Emanuel Berg |
Subject: |
Re: Help with font-lock-add-keywords |
Date: |
Fri, 13 Mar 2015 04:33:17 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
> I'm trying to grok the font-lock-add-keywords
> function. Why doesn't this work (i.e., turn all
> foo's into italic ones)?
>
> (font-lock-add-keywords nil '(("foo" . italic)))
Try this - it should look like this after you put
Emacs into emacs-lisp-mode:
http://user.it.uu.se/~embe8573/cols/www/dumps/emacs_faces.png
(font-lock-add-keywords 'emacs-lisp-mode
'(
("font-lock-builtin-face" . font-lock-builtin-face)
("font-lock-comment-delimiter-face" . font-lock-comment-delimiter-face)
("font-lock-comment-face" . font-lock-comment-face)
("font-lock-constant-face" . font-lock-constant-face)
("font-lock-doc-face" . font-lock-doc-face)
("font-lock-function-name-face" . font-lock-function-name-face)
("font-lock-keyword-face" . font-lock-keyword-face)
("font-lock-negation-char-face" . font-lock-negation-char-face)
("font-lock-preprocessor-face" . font-lock-preprocessor-face)
("font-lock-reference-face" . font-lock-reference-face)
("font-lock-string-face" . font-lock-string-face)
("font-lock-syntactic-face-function" . font-lock-syntactic-face-function)
("font-lock-type-face" . font-lock-type-face)
("font-lock-variable-name-face" . font-lock-variable-name-face)
("font-lock-warning-face" . font-lock-warning-face)
("font-lock-regexp-grouping-construct" .
'font-lock-regexp-grouping-construct)
("font-lock-regexp-grouping-backslash" .
'font-lock-regexp-grouping-backslash)
)
t)
--
underground experts united
- Re: Help with font-lock-add-keywords,
Emanuel Berg <=