comparison lisp/cus-edit.el @ 28172:b243caac6505

(custom-variable-tag-face): Handle case that default face's height is not a number. (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Ditto. (custom-group-tag-face-1): Add :group.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 16 Mar 2000 22:14:18 +0000
parents e419308bcc0c
children 6896ac619ba9
comparison
equal deleted inserted replaced
28171:08317cc36a7b 28172:b243caac6505
1983 1983
1984 ;;; The `custom-variable' Widget. 1984 ;;; The `custom-variable' Widget.
1985 1985
1986 ;; When this was underlined blue, users confused it with a 1986 ;; When this was underlined blue, users confused it with a
1987 ;; Mosaic-style hyperlink... 1987 ;; Mosaic-style hyperlink...
1988 (defface custom-variable-tag-face `((((class color) 1988 (defface custom-variable-tag-face
1989 (background dark)) 1989 `((((class color)
1990 (:foreground "light blue" 1990 (background dark))
1991 :bold t 1991 (:foreground "light blue" :bold t :family "helv"
1992 :family "helv" 1992 :height ,(let ((height (face-attribute 'default :height)))
1993 :height ,(floor (face-attribute 1993 (if (numberp height)
1994 'default :height) 0.9))) 1994 (floor height 0.9)
1995 (((class color) 1995 height))))
1996 (background light)) 1996 (((class color)
1997 (:foreground "blue" :family "helv" 1997 (background light))
1998 :bold t 1998 (:foreground "blue" :family "helv" :bold t
1999 :height ,(floor (face-attribute 1999 :height ,(let ((height (face-attribute 'default :height)))
2000 'default :height) 0.9))) 2000 (if (numberp height)
2001 (t (:bold t))) 2001 (floor height 0.9)
2002 height))))
2003 (t (:bold t)))
2002 "Face used for unpushable variable tags." 2004 "Face used for unpushable variable tags."
2003 :group 'custom-faces) 2005 :group 'custom-faces)
2004 2006
2005 (defface custom-variable-button-face '((t (:underline t :bold t))) 2007 (defface custom-variable-button-face '((t (:underline t :bold t)))
2006 "Face used for pushable variable tags." 2008 "Face used for pushable variable tags."
2518 Match frames with dark backgrounds.") 2520 Match frames with dark backgrounds.")
2519 dark))))))) 2521 dark)))))))
2520 2522
2521 ;;; The `custom-face' Widget. 2523 ;;; The `custom-face' Widget.
2522 2524
2523 (defface custom-face-tag-face `((t (:bold t :family "helv" 2525 (defface custom-face-tag-face
2524 :height ,(floor (face-attribute 2526 `((t (:bold t :family "helv"
2525 'default :height) 0.9)))) 2527 :height ,(let ((height (face-attribute 'default :height)))
2528 (if (numberp height)
2529 (floor height 0.9)
2530 height)))))
2526 "Face used for face tags." 2531 "Face used for face tags."
2527 :group 'custom-faces) 2532 :group 'custom-faces)
2528 2533
2529 (defcustom custom-face-default-form 'selected 2534 (defcustom custom-face-default-form 'selected
2530 "Default form of displaying face definition." 2535 "Default form of displaying face definition."
2974 and so forth. The remaining group tags are shown with 2979 and so forth. The remaining group tags are shown with
2975 `custom-group-tag-face'." 2980 `custom-group-tag-face'."
2976 :type '(repeat face) 2981 :type '(repeat face)
2977 :group 'custom-faces) 2982 :group 'custom-faces)
2978 2983
2979 (defface custom-group-tag-face-1 `((((class color) 2984 (defface custom-group-tag-face-1
2980 (background dark)) 2985 `((((class color)
2981 (:foreground "pink" :family "helv" 2986 (background dark))
2982 :height ,(floor (face-attribute 2987 (:foreground "pink" :family "helv"
2983 'default :height) 0.9) 2988 :height ,(let ((height (face-attribute 'default :height)))
2984 :bold t)) 2989 (if (numberp height)
2985 (((class color) 2990 (floor height 0.9)
2986 (background light)) 2991 height))
2987 (:foreground "red" :bold t 2992 :bold t))
2988 :height ,(floor (face-attribute 2993 (((class color)
2989 'default :height) 0.9))) 2994 (background light))
2990 (t (:bold t))) 2995 (:foreground "red" :bold t
2991 "Face used for group tags.") 2996 :height ,(let ((height (face-attribute 'default :height)))
2992 2997 (if (numberp height)
2993 (defface custom-group-tag-face `((((class color) 2998 (floor height 0.9)
2994 (background dark)) 2999 height))))
2995 (:foreground "light blue" :bold t 3000 (t (:bold t)))
2996 :height ,(floor (face-attribute 3001 "Face used for group tags."
2997 'default :height) 0.9))) 3002 :group 'custom-faces)
2998 (((class color) 3003
2999 (background light)) 3004 (defface custom-group-tag-face
3000 (:foreground "blue" :bold t 3005 `((((class color)
3001 :height ,(floor (face-attribute 3006 (background dark))
3002 'default :height) 0.9))) 3007 (:foreground "light blue" :bold t
3003 (t (:bold t))) 3008 :height ,(let ((height (face-attribute 'default :height)))
3009 (if (numberp height)
3010 (floor height 0.9)
3011 height))))
3012 (((class color)
3013 (background light))
3014 (:foreground "blue" :bold t
3015 :height ,(let ((height (face-attribute 'default :height)))
3016 (if (numberp height)
3017 (floor height 0.9)
3018 height))))
3019 (t (:bold t)))
3004 "Face used for low level group tags." 3020 "Face used for low level group tags."
3005 :group 'custom-faces) 3021 :group 'custom-faces)
3006 3022
3007 (define-widget 'custom-group 'custom 3023 (define-widget 'custom-group 'custom
3008 "Customize group." 3024 "Customize group."