]> code.delx.au - gnu-emacs/blobdiff - lisp/cus-face.el
(latex-run-command): Doc fix.
[gnu-emacs] / lisp / cus-face.el
index b82ff1594964b28b3e989b2bd00a47f5a47c1a34..b94ebbd033bdfbe15eec575c6b6899ba9d07f549 100644 (file)
@@ -4,7 +4,7 @@
 ;;
 ;; 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)
@@ -90,7 +102,7 @@ Control whether the text should be underlined.")
   "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.