;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: help, faces
-;; Version: 1.84
+;; Version: Emacs
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;; This file is part of GNU Emacs.
;;; Code:
+(defalias 'custom-facep
+ (if (fboundp 'facep) 'facep
+ '(lambda (face) nil)))
+
;;; Declaring a face.
;;;###autoload
(while frames
(setq frame (car frames)
frames (cdr frames))
- (face-spec-set face value frame)))))
- (when (and doc (null (face-doc-string face)))
- (set-face-doc-string face doc))
+ (face-spec-set face value frame)))
+ ;; When making a face after frames already exist
+ (if (memq window-system '(x w32))
+ (make-face-x-resource-internal face))))
+ (when (and doc (null (face-documentation face)))
+ (set-face-documentation face doc))
(custom-handle-all-keywords face args 'custom-face)
(run-hooks 'custom-define-hook))
face)
;;; Font Attributes.
(defconst custom-face-attributes
- '((:bold (toggle :format "%[Bold%]: %v\n"
- :help-echo "Control whether a bold font should be used.")
+ '((:bold (boolean :tag "Bold"
+ :help-echo "Control whether a bold font should be used.")
set-face-bold-p
face-bold-p)
- (:italic (toggle :format "%[Italic%]: %v\n"
- :help-echo "\
+ (:italic (boolean :tag "Italic"
+ :help-echo "\
Control whether an italic font should be used.")
set-face-italic-p
face-italic-p)
- (:underline (toggle :format "%[Underline%]: %v\n"
- :help-echo "\
+ (:underline (boolean :tag "Underline"
+ :help-echo "\
Control whether the text should be underlined.")
set-face-underline-p
face-underline-p)
+ (:inverse-video (boolean :tag "Inverse Video"
+ :help-echo "\
+Control whether the text should be in inverse video.")
+ set-face-inverse-video-p
+ face-inverse-video-p)
(:foreground (color :tag "Foreground"
- :value "black"
+ :value ""
:help-echo "Set foreground color.")
set-face-foreground
face-foreground)
(:background (color :tag "Background"
- :value "white"
+ :value ""
:help-echo "Set background color.")
set-face-background
face-background)
"Alist of face attributes.
The elements are of the form (KEY TYPE SET GET),
where KEY is the name of the attribute,
-TYPE is a widget type for editing the attibute,
+TYPE is a widget type for editing the attribute,
SET is a function for setting the attribute value,
and GET is a function for getiing the attribute value.