[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109690: * lisp/font-lock.el (font-lo
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109690: * lisp/font-lock.el (font-lock-add-keywords): Doc fix |
Date: |
Mon, 20 Aug 2012 00:30:40 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109690
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2012-08-20 00:30:40 -0700
message:
* lisp/font-lock.el (font-lock-add-keywords): Doc fix
(quote face names since most non-font-lock faces are not also variables).
modified:
lisp/ChangeLog
lisp/font-lock.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-08-20 07:23:51 +0000
+++ b/lisp/ChangeLog 2012-08-20 07:30:40 +0000
@@ -1,3 +1,8 @@
+2012-08-20 Glenn Morris <address@hidden>
+
+ * font-lock.el (font-lock-add-keywords): Doc fix (quote face names
+ since most non-font-lock faces are not also variables).
+
2012-08-20 Edward Reingold <address@hidden>
* calendar/cal-tex.el (cal-tex-cursor-week-at-a-glance):
=== modified file 'lisp/font-lock.el'
--- a/lisp/font-lock.el 2012-07-10 11:51:54 +0000
+++ b/lisp/font-lock.el 2012-08-20 07:30:40 +0000
@@ -146,8 +146,8 @@
;; fontified automagically. In your ~/.emacs there could be:
;;
;; (defvar foo-font-lock-keywords
-;; '(("\\<\\(one\\|two\\|three\\)\\>" . font-lock-keyword-face)
-;; ("\\<\\(four\\|five\\|six\\)\\>" . font-lock-type-face))
+;; '(("\\<\\(one\\|two\\|three\\)\\>" . 'font-lock-keyword-face)
+;; ("\\<\\(four\\|five\\|six\\)\\>" . 'font-lock-type-face))
;; "Default expressions to highlight in Foo mode.")
;;
;; (add-hook 'foo-mode-hook
@@ -167,8 +167,8 @@
;; could be:
;;
;; (defvar bar-font-lock-keywords
-;; '(("\\<\\(uno\\|due\\|tre\\)\\>" . font-lock-keyword-face)
-;; ("\\<\\(quattro\\|cinque\\|sei\\)\\>" . font-lock-type-face))
+;; '(("\\<\\(uno\\|due\\|tre\\)\\>" . 'font-lock-keyword-face)
+;; ("\\<\\(quattro\\|cinque\\|sei\\)\\>" . 'font-lock-type-face))
;; "Default expressions to highlight in Bar mode.")
;;
;; and within `bar-mode' there could be:
@@ -679,8 +679,8 @@
For example:
(font-lock-add-keywords 'c-mode
- '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend)
- (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" .
font-lock-keyword-face)))
+ '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 'font-lock-warning-face prepend)
+ (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" .
'font-lock-keyword-face)))
adds two fontification patterns for C mode, to fontify `FIXME:' words, even in
comments, and to fontify `and', `or' and `not' words as keywords.
@@ -694,9 +694,9 @@
(add-hook 'c-mode-hook
(lambda ()
(font-lock-add-keywords nil
- '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend)
+ '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 'font-lock-warning-face prepend)
(\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" .
- font-lock-keyword-face)))))
+ 'font-lock-keyword-face)))))
The above procedure may fail to add keywords to derived modes if
some involved major mode does not follow the standard conventions.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109690: * lisp/font-lock.el (font-lock-add-keywords): Doc fix,
Glenn Morris <=