diff lisp/custom/cus-face.el @ 136:b980b6286996 r20-2b2

Import from CVS: tag r20-2b2
author cvs
date Mon, 13 Aug 2007 09:31:12 +0200
parents 34a5b81f86ba
children 538048ae2ab8
line wrap: on
line diff
--- a/lisp/custom/cus-face.el	Mon Aug 13 09:30:13 2007 +0200
+++ b/lisp/custom/cus-face.el	Mon Aug 13 09:31:12 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, faces
-;; Version: 1.89
+;; Version: 1.84
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;;; Commentary:
@@ -37,20 +37,13 @@
 				     'face-font-name
 				   'face-font))
 
-
 (eval-and-compile
-  (cond ((fboundp 'frame-property)
-	 ;; XEmacs.
-	 (defalias 'custom-frame-parameter 'frame-property))
-	((fboundp 'frame-parameter)
-	 ;; Emacs 19.35.
-	 (defalias 'custom-frame-parameter 'frame-parameter))
-	(t
-	 ;; Old emacsen.
-	 (defun custom-frame-parameter (frame property &optional default)
-	   "Return FRAME's value for property PROPERTY."
-	   (or (cdr (assq property (frame-parameters frame)))
-	       default))))
+  (unless (fboundp 'frame-property)
+    ;; XEmacs function missing in Emacs.
+    (defun frame-property (frame property &optional default)
+      "Return FRAME's value for property PROPERTY."
+      (or (cdr (assq property (frame-parameters frame)))
+	  default)))
 
   (unless (fboundp 'face-doc-string)
     ;; XEmacs function missing in Emacs.
@@ -153,12 +146,12 @@
 ;;    (interactive (list (read-face-name "Reverse face: ")))
 ;;    (let ((fg (or (face-foreground face frame)
 ;;		  (face-foreground 'default frame)
-;;		  (custom-frame-parameter (or frame (selected-frame))
+;;		  (frame-property (or frame (selected-frame))
 ;;				  'foreground-color)
 ;;		  "black"))
 ;;	  (bg (or (face-background face frame)
 ;;		  (face-background 'default frame)
-;;		  (custom-frame-parameter (or frame (selected-frame))
+;;		  (frame-property (or frame (selected-frame))
 ;;				  'background-color)
 ;;		  "white")))
 ;;      (set-face-foreground face bg frame)
@@ -184,7 +177,7 @@
 	 (mode (cond (bg-resource
 		      (intern (downcase bg-resource)))
 		     ((and (setq color (condition-case ()
-					   (or (custom-frame-parameter
+					   (or (frame-property
 						frame
 						'background-color)
 					       (custom-face-background
@@ -208,16 +201,16 @@
 	(list 'type (device-type (frame-device frame))
 	      'class (device-class (frame-device frame))
 	      'background (or custom-background-mode
-			      (custom-frame-parameter frame
+			      (frame-property frame
 					      'background-mode)
 			      (custom-background-mode frame))))
     ;; Emacs.
     (defun custom-extract-frame-properties (frame)
       "Return a plist with the frame properties of FRAME used by custom."
       (list 'type window-system
-	    'class (custom-frame-parameter frame 'display-type)
+	    'class (frame-property frame 'display-type)
 	    'background (or custom-background-mode
-			    (custom-frame-parameter frame 'background-mode)
+			    (frame-property frame 'background-mode)
 			    (custom-background-mode frame))))))  
 
 ;;; Declaring a face.
@@ -225,9 +218,7 @@
 ;;;###autoload
 (defun custom-declare-face (face spec doc &rest args)
   "Like `defface', but FACE is evaluated as a normal argument."
-  (when (or (fboundp 'load-gc)		;XEmacs.
-	    ;; Emacs.
-	    (and (boundp purify-flag) purify-flag))
+  (when (fboundp 'load-gc)
     ;; This should be allowed, somehow.
     (error "Attempt to declare a face during dump"))
   (unless (get face 'factory-face)
@@ -452,7 +443,7 @@
 If FRAME is nil, return the default frame properties."
   (cond (frame
 	 ;; Try to get from cache.
-	 (let ((cache (custom-frame-parameter frame 'custom-properties)))
+	 (let ((cache (frame-property frame 'custom-properties)))
 	   (unless cache
 	     ;; Oh well, get it then.
 	     (setq cache (custom-extract-frame-properties frame))