]> code.delx.au - gnu-emacs/blobdiff - lisp/button.el
(popup-dialog-box): Don't quote nil and t in docstrings.
[gnu-emacs] / lisp / button.el
index 998d639065164ad01b575896251b3e05b5a37c6e..d6f089327a2787b96a7415892a48e0e16844116d 100644 (file)
@@ -1,4 +1,4 @@
-;;; button.el --- Clickable buttons
+;;; button.el --- clickable buttons
 ;;
 ;; Copyright (C) 2001 Free Software Foundation, Inc.
 ;;
 \f
 ;; Globals
 
-(defface button '((t :underline t))
-  "Default face used for buttons.")
+(defface button '((((type pc) (class color))
+                  (:foreground "lightblue"))
+                 (t :underline t))
+  "Default face used for buttons."
+  :group 'faces)
 
 ;;;###autoload
 (defvar button-map
@@ -119,12 +122,12 @@ In addition, the keyword argument :supertype may be used to specify a
 button-type from which NAME inherits its default property values
 \(however, the inheritance happens only when NAME is defined; subsequent
 changes to a supertype are not reflected in its subtypes)."
-  (let* ((catsym (make-symbol (concat (symbol-name name) "-button")))
-        (supertype
+  (let ((catsym (make-symbol (concat (symbol-name name) "-button")))
+       (super-catsym
+        (button-category-symbol
          (or (plist-get properties 'supertype)
-             (plist-get properties :supertype)))
-        (super-catsym
-         (if supertype (button-category-symbol supertype) 'default-button)))
+             (plist-get properties :supertype)
+             'button))))
     ;; Provide a link so that it's easy to find the real symbol.
     (put name 'button-category-symbol catsym)
     ;; Initialize NAME's properties using the global defaults.
@@ -140,6 +143,9 @@ changes to a supertype are not reflected in its subtypes)."
        (when (eq prop :supertype)
          (setq prop 'supertype))
        (put catsym prop (pop properties))))
+    ;; Make sure there's a `supertype' property
+    (unless (get catsym 'supertype)
+      (put catsym 'supertype 'button))
     name))
 
 (defun button-type-put (type prop val)