If FRAME is omitted or nil, use the selected frame."
(color-instance-rgb-components (make-color-instance color))))
-;; XEmacs and Emacs have different definitions of `facep'.
-;; The Emacs definition is the useful one, so emulate that.
+;; XEmacs and Emacs have different definitions of `facep'.
+;; The Emacs definition is the useful one, so emulate that.
(cond ((not (fboundp 'facep))
- (defun custom-facep (face)
+ (defun custom-facep (face)
"No faces"
nil))
((string-match "XEmacs" emacs-version)
Does nothing when the variable initialize-face-resources is nil."
(when initialize-face-resources
(make-face-x-resource-internal face frame t))))
- (t
+ (t
;; Too hard to do right on XEmacs.
(defalias 'initialize-face-resources 'ignore)))
your background is light, or nil (default) if you want Emacs to
examine the brightness for you."
:group 'customize
- :type '(choice (choice-item dark)
+ :type '(choice (choice-item dark)
(choice-item light)
(choice-item :tag "default" nil)))
'class (frame-property frame 'display-type)
'background (or custom-background-mode
(frame-property frame 'background-mode)
- (custom-background-mode frame))))))
+ (custom-background-mode frame))))))
(defconst custom-face-attributes
'((:bold (toggle :format "Bold: %[%v%]\n") custom-set-face-bold)
(toggle :format "Underline: %[%v%]\n") set-face-underline-p)
(:foreground (color :tag "Foreground") set-face-foreground)
(:background (color :tag "Background") set-face-background)
- (:reverse (const :format "Reverse Video\n" t)
+ (:reverse (const :format "Reverse Video\n" t)
(lambda (face value &optional frame)
;; We don't use VALUE.
(reverse-face face frame)))
(:stipple (editable-field :format "Stipple: %v") set-face-stipple))
- "Alist of face attributes.
+ "Alist of face attributes.
The elements are of the form (KEY TYPE SET) where KEY is a symbol
identifying the attribute, TYPE is a widget type for editing the
Each keyword should be listed in `custom-face-attributes'.
If FRAME is nil, set the default face."
- (while atts
+ (while atts
(let* ((name (nth 0 atts))
(value (nth 1 atts))
(fun (nth 2 (assq name custom-face-attributes))))
(apply 'set-face-font face fontobj args)))
(nconc custom-face-attributes
- '((:family (editable-field :format "Family: %v")
+ '((:family (editable-field :format "Family: %v")
custom-set-face-font-family)
(:size (editable-field :format "Size: %v")
custom-set-face-font-size))))
Iff optional FRAME is non-nil, set it for that frame only.
See `defface' for information about SPEC."
(when (fboundp 'make-face)
- (while spec
+ (while spec
(let* ((entry (car spec))
(display (nth 0 entry))
(atts (nth 1 entry)))
(defun custom-background-mode (frame)
"Kludge to detect background mode for FRAME."
- (let* ((bg-resource
+ (let* ((bg-resource
(condition-case ()
(x-get-resource ".backgroundMode" "BackgroundMode" 'string)
(error nil)))
(defvar custom-default-frame-properties nil
"The frame properties used for the global faces.
Frames who doesn't match these propertiess should have frame local faces.
-The value should be nil, if uninitialized, or a plist otherwise.
+The value should be nil, if uninitialized, or a plist otherwise.
See `defface' for a list of valid keys and values for the plist.")
(defun custom-get-frame-properties (&optional frame)
;; Oh well, get it then.
(setq cache (custom-extract-frame-properties frame))
;; and cache it...
- (modify-frame-parameters frame
+ (modify-frame-parameters frame
(list (cons 'custom-properties cache))))
cache))
(custom-default-frame-properties)
((eq req 'background)
(memq background options))
(t
- (error "Unknown req `%S' with options `%S'"
+ (error "Unknown req `%S' with options `%S'"
req options)))))
match)))
(mapcar (lambda (symbol)
(let ((spec (or (get symbol 'saved-face)
(get symbol 'factory-face))))
- (when spec
+ (when spec
(custom-face-display-set symbol spec frame)
(initialize-face-resources symbol frame))))
(face-list)))
If FRAME is missing or nil, the first member (frame-list) is used."
(unless frame
(setq frame (car (frame-list))))
- (unless (equal (custom-get-frame-properties)
+ (unless (equal (custom-get-frame-properties)
(custom-get-frame-properties frame))
(custom-initialize-faces frame)))