changeset 63997:3314a44dacf7

(custom-theme-set-faces): Make it handle face aliases whose alias declarations are pre- or autoloaded.
author Luc Teirlinck <teirllm@auburn.edu>
date Mon, 04 Jul 2005 01:44:38 +0000
parents 24da8be87a7d
children 7651543ac34c
files lisp/cus-face.el
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-face.el	Mon Jul 04 01:40:42 2005 +0000
+++ b/lisp/cus-face.el	Mon Jul 04 01:44:38 2005 +0000
@@ -320,6 +320,10 @@
 		  (spec (nth 1 entry))
 		  (now (nth 2 entry))
 		  (comment (nth 3 entry)))
+	      ;; If FACE is actually an alias, customize the face it
+	      ;; is aliased to.
+	      (if (get face 'face-alias)
+		  (setq face (get face 'face-alias)))
 	      (put face 'saved-face spec)
 	      (put face 'saved-face-comment comment)
 	      (custom-push-theme 'theme-face face theme 'set spec)
@@ -334,6 +338,8 @@
 	;; Old format, a plist of FACE SPEC pairs.
 	(let ((face (nth 0 args))
 	      (spec (nth 1 args)))
+	  (if (get face 'face-alias)
+		  (setq face (get face 'face-alias)))
 	  (put face 'saved-face spec)
 	  (custom-push-theme 'theme-face face theme 'set spec))
 	(setq args (cdr (cdr args))))))))