]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/font-lock.el (font-lock-add-keywords): Doc fix
authorGlenn Morris <rgm@gnu.org>
Mon, 20 Aug 2012 07:30:40 +0000 (00:30 -0700)
committerGlenn Morris <rgm@gnu.org>
Mon, 20 Aug 2012 07:30:40 +0000 (00:30 -0700)
(quote face names since most non-font-lock faces are not also variables).

lisp/ChangeLog
lisp/font-lock.el

index 2895aef3a7e69088f3dbcd8e102249b90870c737..b944746861c0008d443df084863f825891c0992d 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-20  Glenn Morris  <rgm@gnu.org>
+
+       * 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  <reingold@iit.edu>
 
        * calendar/cal-tex.el (cal-tex-cursor-week-at-a-glance):
index f3e313e9c3505739cd21a81727e950216d4e37b5..77c21d265354003f98867b204593df059817d214 100644 (file)
 ;; 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
 ;; 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 @@ end of the current highlighting list.
 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 @@ For example:
  (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.