changeset 63532:54180ad25436

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-430 Remove "-face" suffix from cc-mode faces 2005-06-17 Miles Bader <miles@gnu.org> * lisp/progmodes/cc-fonts.el (c-nonbreakable-space-face): Remove "-face" suffix from face name. (c-cpp-matchers): Use the variable `c-nonbreakable-space-face' instead of literal face.
author Miles Bader <miles@gnu.org>
date Fri, 17 Jun 2005 05:07:26 +0000
parents 60261c7a1b56
children b7ea6515f1ba
files lisp/ChangeLog lisp/progmodes/cc-fonts.el
diffstat 2 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Jun 17 01:29:30 2005 +0000
+++ b/lisp/ChangeLog	Fri Jun 17 05:07:26 2005 +0000
@@ -1,3 +1,10 @@
+2005-06-17  Miles Bader  <miles@gnu.org>
+
+	* progmodes/cc-fonts.el (c-nonbreakable-space-face): Remove
+	"-face" suffix from face name.
+	(c-cpp-matchers): Use the variable `c-nonbreakable-space-face'
+	instead of literal face.
+
 2005-06-17  Juanma Barranquero  <lekktu@gmail.com>
 
 	* progmodes/ada-mode.el (ada-format-paramlist)
--- a/lisp/progmodes/cc-fonts.el	Fri Jun 17 01:29:30 2005 +0000
+++ b/lisp/progmodes/cc-fonts.el	Fri Jun 17 05:07:26 2005 +0000
@@ -193,6 +193,10 @@
 
 (unless (c-face-name-p c-invalid-face-name)
   (defconst c-invalid-face 'c-invalid-face) ; Necessary in Emacs 19.
+  ;; This face should be called `c-invalid' for consistency with the
+  ;; rest of emacs, but as it's only used in very old versions of Emacs,
+  ;; we leave it unchanged (the face-alias mechanism doesn't exist in
+  ;; those old versions).
   (defface c-invalid-face
     '((((class color) (background light)) (:foreground "red1"))
       (((class color)) (:foreground "hotpink"))
@@ -203,8 +207,8 @@
 ;; To make hard spaces visible an inverted version of
 ;; `c-invalid-face-name' is used.  Since font-lock in Emacs expands
 ;; all face names in `font-lock-keywords' as variables we need to have
-;; a variable for it that resolves to its own name.
-(defconst c-nonbreakable-space-face 'c-nonbreakable-space-face)
+;; a variable for it.
+(defconst c-nonbreakable-space-face 'c-nonbreakable-space)
 
 (cc-bytecomp-defun face-inverse-video-p) ; Only in Emacs.
 (cc-bytecomp-defun face-property-instance) ; Only in XEmacs.
@@ -511,9 +515,9 @@
       (eval . (list
 	       "\240"
 	       0 (progn
-		   (unless (c-face-name-p 'c-nonbreakable-space-face)
+		   (unless (c-face-name-p c-nonbreakable-space-face)
 		     (c-make-inverse-face c-invalid-face-name
-					  'c-nonbreakable-space-face))
+					  c-nonbreakable-space-face))
 		   'c-nonbreakable-space-face)))
       ))