2000-07-07 Ben Wing <ben(a)xemacs.org>
* font-lock.el: Undo previous change. Unfortunately, some
files actually use the variables directly in their init code
without quoting them.
--
Ben
In order to save my hands, I am cutting back on my mail. I also write
as succinctly as possible -- please don't be offended. If you send me
mail, you _will_ get a response, but please be patient, especially for
XEmacs-related mail. If you need an immediate response and it is not
apparent in your message, please say so. Thanks for your understanding.
See also
http://www.666.com/ben/chronic-pain/
Index: font-lock.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/lisp/font-lock.el,v
retrieving revision 1.7.2.18
retrieving revision 1.7.2.19
diff -u -r1.7.2.18 -r1.7.2.19
--- font-lock.el 2000/07/07 07:20:56 1.7.2.18
+++ font-lock.el 2000/07/08 03:07:41 1.7.2.19
@@ -339,7 +339,7 @@
MATCH :== An integer match subexpression number from MATCHER.
FACE-FORM :== The symbol naming a defined face.
- | Expression whose value is the face name to use. If you
+ | Expression whos value is the face name to use. If you
want FACE-FORM to be a symbol that evaluates to a face,
use a form like \"(progn sym)\".
@@ -578,6 +578,58 @@
;;; Initialization of faces.
+;; #### barf gag retch. Horrid FSF lossage that we need to
+;; keep around for compatibility with font-lock-keywords that
+;; forget to properly quote their faces. I tried just let-binding
+;; them when we eval the face expression, but that failes because
+;; some files actually use the variables directly in their init code
+;; without quoting them. --ben
+(defvar font-lock-comment-face 'font-lock-comment-face
+ "This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-doc-string-face 'font-lock-doc-string-face
+ "This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-string-face 'font-lock-string-face
+ "This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-keyword-face 'font-lock-keyword-face
+ "This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-function-name-face 'font-lock-function-name-face
+ "This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-variable-name-face 'font-lock-variable-name-face
+ "This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-type-face 'font-lock-type-face
+ "This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-reference-face 'font-lock-reference-face
+ "This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-preprocessor-face 'font-lock-preprocessor-face
+ "This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+
(defconst font-lock-face-list
'(font-lock-comment-face
font-lock-string-face
@@ -1424,24 +1476,7 @@
(override (nth 2 highlight)))
(let ((newface (nth 1 highlight)))
(or (symbolp newface)
- (setq newface
- ;; FSF lossage. Face names are defvarred to
- ;; themselves. Ugly ugly ugly. We used to have the
- ;; defvars ourselves, but doing it this way is much
- ;; cleaner.
- (let ((font-lock-comment-face 'font-lock-comment-face)
- (font-lock-doc-string-face 'font-lock-doc-string-face)
- (font-lock-string-face 'font-lock-string-face)
- (font-lock-keyword-face 'font-lock-keyword-face)
- (font-lock-function-name-face
- 'font-lock-function-name-face)
- (font-lock-variable-name-face
- 'font-lock-variable-name-face)
- (font-lock-type-face 'font-lock-type-face)
- (font-lock-reference-face 'font-lock-reference-face)
- (font-lock-preprocessor-face
- 'font-lock-preprocessor-face))
- (eval newface))))
+ (setq newface (eval newface)))
(cond ((not start)
;; No match but we might not signal an error.
(or (nth 3 highlight)