;;; The `custom' Widget.
(defface custom-button-face
- '((((type x) (class color)) ; Like default modeline
- (:box (:line-width 2 :style released-button)
- :background "lightgrey" :foreground "black"))
- (((type w32) (class color)) ; Like default modeline
+ '((((type x w32 mac) (class color)) ; Like default modeline
(:box (:line-width 2 :style released-button)
:background "lightgrey" :foreground "black"))
(t
:group 'custom-faces)
(defface custom-button-pressed-face
- '((((type x) (class color))
- (:box (:line-width 2 :style pressed-button)
- :background "lightgrey" :foreground "black"))
- (((type w32) (class color))
+ '((((type x w32 mac) (class color))
(:box (:line-width 2 :style pressed-button)
:background "lightgrey" :foreground "black"))
(t
(defface custom-variable-tag-face
`((((class color)
(background dark))
- (:foreground "light blue" :bold t :family "helv"
- :height ,(let ((height (face-attribute 'default :height)))
- (if (numberp height)
- (floor height 0.9)
- height))))
+ (:foreground "light blue" :bold t :height 1.2 :inherit variable-pitch))
(((class color)
(background light))
- (:foreground "blue" :family "helv" :bold t
- :height ,(let ((height (face-attribute 'default :height)))
- (if (numberp height)
- (floor height 0.9)
- height))))
+ (:foreground "blue" :bold t :height 1.2 :inherit variable-pitch))
(t (:bold t)))
"Face used for unpushable variable tags."
:group 'custom-faces)
;;; The `custom-face' Widget.
(defface custom-face-tag-face
- `((t (:bold t :family "helv"
- :height ,(let ((height (face-attribute 'default :height)))
- (if (numberp height)
- (floor height 0.9)
- height)))))
+ `((t (:bold t :height 1.2 :inherit variable-pitch)))
"Face used for face tags."
:group 'custom-faces)
(if (eq custom-buffer-style 'face)
(insert " ")
(widget-specify-sample widget begin (point))
- (insert ": "))
+ (if (string-match "face\\'" tag)
+ (insert ":")
+ (insert " face: ")))
;; Sample.
(push (widget-create-child-and-convert widget 'item
:format "(%{%t%})"
(defface custom-group-tag-face-1
`((((class color)
(background dark))
- (:foreground "pink" :family "helv"
- :height ,(let ((height (face-attribute 'default :height)))
- (if (numberp height)
- (floor height 0.9)
- height))
- :bold t))
+ (:foreground "pink" :bold t :height 1.2 :inherit variable-pitch))
(((class color)
(background light))
- (:foreground "red" :bold t
- :height ,(let ((height (face-attribute 'default :height)))
- (if (numberp height)
- (floor height 0.9)
- height))))
+ (:foreground "red" :bold t :height 1.2 :inherit variable-pitch))
(t (:bold t)))
"Face used for group tags."
:group 'custom-faces)
(defface custom-group-tag-face
`((((class color)
(background dark))
- (:foreground "light blue" :bold t
- :height ,(let ((height (face-attribute 'default :height)))
- (if (numberp height)
- (floor height 0.9)
- height))))
+ (:foreground "light blue" :bold t :height 1.2))
(((class color)
(background light))
- (:foreground "blue" :bold t
- :height ,(let ((height (face-attribute 'default :height)))
- (if (numberp height)
- (floor height 0.9)
- height))))
+ (:foreground "blue" :bold t :height 1.2))
(t (:bold t)))
"Face used for low level group tags."
:group 'custom-faces)
"Keymap for `custom-mode'.")
(unless custom-mode-map
- (setq custom-mode-map (make-sparse-keymap))
+ (setq custom-mode-map (make-keymap))
(set-keymap-parent custom-mode-map widget-keymap)
(suppress-keymap custom-mode-map)
(define-key custom-mode-map " " 'scroll-up)
(set (make-local-variable 'widget-push-button-suffix) "")
(set (make-local-variable 'widget-link-prefix) "")
(set (make-local-variable 'widget-link-suffix) ""))
- (make-local-hook 'widget-edit-functions)
(add-hook 'widget-edit-functions 'custom-state-buffer-message nil t)
(run-hooks 'custom-mode-hook))
+(put 'custom-mode 'mode-class 'special)
+
(add-to-list
'debug-ignored-errors
"^No user options have changed defaults in recent Emacs versions$")