emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/cus-edit.el


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/cus-edit.el
Date: Sun, 23 Oct 2005 13:40:40 -0400

Index: emacs/lisp/cus-edit.el
diff -c emacs/lisp/cus-edit.el:1.236 emacs/lisp/cus-edit.el:1.237
*** emacs/lisp/cus-edit.el:1.236        Tue Oct 18 00:28:56 2005
--- emacs/lisp/cus-edit.el      Sun Oct 23 17:40:38 2005
***************
*** 1377,1389 ****
    (interactive)
    (quit-window custom-buffer-done-kill))
  
  (defcustom custom-raised-buttons (not (equal (face-valid-attribute-values 
:box)
                                             '(("unspecified" . unspecified))))
    "If non-nil, indicate active buttons in a `raised-button' style.
  Otherwise use brackets."
    :type 'boolean
    :version "21.1"
!   :group 'custom-buffer)
  
  (defun custom-buffer-create-internal (options &optional description)
    (custom-mode)
--- 1377,1403 ----
    (interactive)
    (quit-window custom-buffer-done-kill))
  
+ (defvar custom-button nil
+   "Face used for buttons in customization buffers.")
+ 
+ (defvar custom-button-pressed nil
+   "Face used for pressed buttons in customization buffers.")
+ 
  (defcustom custom-raised-buttons (not (equal (face-valid-attribute-values 
:box)
                                             '(("unspecified" . unspecified))))
    "If non-nil, indicate active buttons in a `raised-button' style.
  Otherwise use brackets."
    :type 'boolean
    :version "21.1"
!   :group 'custom-buffer
!   :set (lambda (variable value)
!        (custom-set-default variable value)
!        (setq custom-button
!              (if value 'custom-button 'custom-button-unraised))
!        (setq custom-button-pressed
!              (if value
!                  'custom-button-pressed
!                'custom-button-pressed-unraised))))
  
  (defun custom-buffer-create-internal (options &optional description)
    (custom-mode)
***************
*** 1896,1919 ****
           :background "lightgrey" :foreground "black"))
      (t
       nil))
!   "Face used for buttons in customization buffers."
    :version "21.1"
    :group 'custom-faces)
  ;; backward-compatibility alias
  (put 'custom-button-face 'face-alias 'custom-button)
  
  (defface custom-button-pressed
    '((((type x w32 mac) (class color))
       (:box (:line-width 2 :style pressed-button)
           :background "lightgrey" :foreground "black"))
      (t
       (:inverse-video t)))
!   "Face used for buttons in customization buffers."
    :version "21.1"
    :group 'custom-faces)
  ;; backward-compatibility alias
  (put 'custom-button-pressed-face 'face-alias 'custom-button-pressed)
  
  (defface custom-documentation nil
    "Face used for documentation strings in customization buffers."
    :group 'custom-faces)
--- 1910,1961 ----
           :background "lightgrey" :foreground "black"))
      (t
       nil))
!   "Face for custom buffer buttons if `custom-raised-buttons' is non-nil."
    :version "21.1"
    :group 'custom-faces)
  ;; backward-compatibility alias
  (put 'custom-button-face 'face-alias 'custom-button)
  
+ (defface custom-button-unraised
+   '((((min-colors 88)
+       (class color) (background light)) :foreground "blue1" :underline t)
+     (((class color) (background light)) :foreground "blue" :underline t)
+     (((min-colors 88)
+       (class color) (background dark)) :foreground "cyan1" :underline t)
+     (((class color) (background dark)) :foreground "cyan" :underline t)
+     (t :underline t))
+   "Face for custom buffer buttons if `custom-raised-buttons' is nil."
+   :version "22.1"
+   :group 'custom-faces)
+ 
+ (setq custom-button
+       (if custom-raised-buttons 'custom-button 'custom-button-unraised))
+ 
  (defface custom-button-pressed
    '((((type x w32 mac) (class color))
       (:box (:line-width 2 :style pressed-button)
           :background "lightgrey" :foreground "black"))
      (t
       (:inverse-video t)))
!   "Face for pressed custom buttons if `custom-raised-buttons' is non-nil."
    :version "21.1"
    :group 'custom-faces)
  ;; backward-compatibility alias
  (put 'custom-button-pressed-face 'face-alias 'custom-button-pressed)
  
+ (defface custom-button-pressed-unraised
+   '((default :inherit custom-button-unraised)
+     (((class color) (background light)) :foreground "magenta4")
+     (((class color) (background dark)) :foreground "violet"))
+   "Face for pressed custom buttons if `custom-raised-buttons' is nil."
+   :version "22.1"
+   :group 'custom-faces)
+ 
+ (setq custom-button-pressed
+   (if custom-raised-buttons
+       'custom-button-pressed
+     'custom-button-pressed-unraised))
+ 
  (defface custom-documentation nil
    "Face used for documentation strings in customization buffers."
    :group 'custom-faces)
***************
*** 4311,4320 ****
    (make-local-variable 'widget-documentation-face)
    (setq widget-documentation-face 'custom-documentation)
    (make-local-variable 'widget-button-face)
!   (setq widget-button-face 'custom-button)
!   (set (make-local-variable 'widget-button-pressed-face) 
'custom-button-pressed)
!   (set (make-local-variable 'widget-mouse-face)
!        'custom-button-pressed)                ; buttons `depress' when moused
    ;; When possible, use relief for buttons, not bracketing.  This test
    ;; may not be optimal.
    (when custom-raised-buttons
--- 4353,4363 ----
    (make-local-variable 'widget-documentation-face)
    (setq widget-documentation-face 'custom-documentation)
    (make-local-variable 'widget-button-face)
!   (setq widget-button-face custom-button)
!   (set (make-local-variable 'widget-button-pressed-face) 
custom-button-pressed)
!   (if custom-raised-buttons
!       (set (make-local-variable 'widget-mouse-face) custom-button))
! 
    ;; When possible, use relief for buttons, not bracketing.  This test
    ;; may not be optimal.
    (when custom-raised-buttons




reply via email to

[Prev in Thread] Current Thread [Next in Thread]