diff lisp/cus-face.el @ 83353:532e0a9335a9

Merged in changes from CVS trunk. Plus added lisp/term tweaks. Patches applied: * lorentey@elte.hu--2004/emacs--cvs-trunk--0--base-0 tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-474 * lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-1 Add CVS metadata files. * lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-2 Update from CVS. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-393
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 04 Sep 2005 03:48:17 +0000
parents 6c13700d1c13 41bb365f41c4
children 732c5740ca8f
line wrap: on
line diff
--- a/lisp/cus-face.el	Thu Aug 25 12:03:34 2005 +0000
+++ b/lisp/cus-face.el	Sun Sep 04 03:48:17 2005 +0000
@@ -1,6 +1,7 @@
 ;;; cus-face.el --- customization support for faces
 ;;
-;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
+;;   2005 Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, faces
@@ -348,53 +349,27 @@
 	(setq args (cdr (cdr args))))))))
 
 ;;;###autoload
-(defun custom-theme-face-value (face theme)
-  "Return spec of FACE in THEME if THEME modifies FACE.
-Value is nil otherwise.  The association between theme and spec for FACE
-is stored in FACE's property `theme-face'.  The appropriate face
-is retrieved using `custom-theme-value'."
-  ;; Returns car because the value is stored inside a one element list
-  (car-safe (custom-theme-value theme (get face 'theme-face))))
+(defun custom-theme-reset-faces (theme &rest args)
+  "Reset the specs in THEME of some faces to their specs in other themes.
+Each of the arguments ARGS has this form:
 
-(defun custom-theme-reset-internal-face (face to-theme)
-  "Reset FACE to the value defined by TO-THEME.
-If FACE is not defined in TO-THEME, reset FACE to the standard
-value.  See `custom-theme-face-value'.  The standard value is
-stored in SYMBOL's property `face-defface-spec' by `defface'."
-  (let ((spec (custom-theme-face-value face to-theme))
-	was-in-theme)
-    (setq was-in-theme spec)
-    (setq spec (or spec (get face 'face-defface-spec)))
-    (when spec
-      (put face 'save-face was-in-theme)
-      (when (or (get face 'force-face) (facep face))
-	      (unless (facep face)
-		(make-empty-face face))
-	      (face-spec-set face spec)))
-    spec))
+    (FACE FROM-THEME)
 
-;;;###autoload
-(defun custom-theme-reset-faces (theme &rest args)
-  "Reset the value of the face to values previously defined.
-Associate this setting with THEME.
-
-ARGS is a list of lists of the form
-
-    (FACE TO-THEME)
-
-This means reset FACE to its value in TO-THEME."
+This means reset FACE to its value in FROM-THEME."
   (custom-check-theme theme)
-  (mapcar '(lambda (arg)
-	     (apply 'custom-theme-reset-internal-face arg)
-	     (custom-push-theme 'theme-face (car arg) theme 'reset (cadr arg)))
-	  args))
+  (dolist (arg args)
+    (custom-push-theme 'theme-face (car arg) theme 'reset (cadr arg))))
 
 ;;;###autoload
 (defun custom-reset-faces (&rest args)
-  "Reset the value of the face to values previously saved.
-This is the setting assosiated the `user' theme.
+  "Reset the specs of some faces to their specs in specified themes.
+This creates settings in the `user' theme.
 
-ARGS is defined as for `custom-theme-reset-faces'"
+Each of the arguments ARGS has this form:
+
+    (FACE FROM-THEME)
+
+This means reset FACE to its value in FROM-THEME."
   (apply 'custom-theme-reset-faces 'user args))
 
 ;;; The End.