Show
Ignore:
Timestamp:
11/01/05 07:08:22 (3 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • vendor/emacs-CVS_HEAD/lisp/cus-edit.el

    r3892 r3939  
    13781378  (quit-window custom-buffer-done-kill)) 
    13791379 
     1380(defvar custom-button nil 
     1381  "Face used for buttons in customization buffers.") 
     1382 
     1383(defvar custom-button-pressed nil 
     1384  "Face used for pressed buttons in customization buffers.") 
     1385 
    13801386(defcustom custom-raised-buttons (not (equal (face-valid-attribute-values :box) 
    13811387                                             '(("unspecified" . unspecified)))) 
     
    13841390  :type 'boolean 
    13851391  :version "21.1" 
    1386   :group 'custom-buffer) 
     1392  :group 'custom-buffer 
     1393  :set (lambda (variable value) 
     1394         (custom-set-default variable value) 
     1395         (setq custom-button 
     1396               (if value 'custom-button 'custom-button-unraised)) 
     1397         (setq custom-button-pressed 
     1398               (if value 
     1399                   'custom-button-pressed 
     1400                 'custom-button-pressed-unraised)))) 
    13871401 
    13881402(defun custom-buffer-create-internal (options &optional description) 
     
    18971911    (t 
    18981912     nil)) 
    1899   "Face used for buttons in customization buffers." 
     1913  "Face for custom buffer buttons if `custom-raised-buttons' is non-nil." 
    19001914  :version "21.1" 
    19011915  :group 'custom-faces) 
    19021916;; backward-compatibility alias 
    19031917(put 'custom-button-face 'face-alias 'custom-button) 
     1918 
     1919(defface custom-button-unraised 
     1920  '((((min-colors 88) 
     1921      (class color) (background light)) :foreground "blue1" :underline t) 
     1922    (((class color) (background light)) :foreground "blue" :underline t) 
     1923    (((min-colors 88) 
     1924      (class color) (background dark)) :foreground "cyan1" :underline t) 
     1925    (((class color) (background dark)) :foreground "cyan" :underline t) 
     1926    (t :underline t)) 
     1927  "Face for custom buffer buttons if `custom-raised-buttons' is nil." 
     1928  :version "22.1" 
     1929  :group 'custom-faces) 
     1930 
     1931(setq custom-button 
     1932      (if custom-raised-buttons 'custom-button 'custom-button-unraised)) 
    19041933 
    19051934(defface custom-button-pressed 
     
    19091938    (t 
    19101939     (:inverse-video t))) 
    1911   "Face used for buttons in customization buffers." 
     1940  "Face for pressed custom buttons if `custom-raised-buttons' is non-nil." 
    19121941  :version "21.1" 
    19131942  :group 'custom-faces) 
    19141943;; backward-compatibility alias 
    19151944(put 'custom-button-pressed-face 'face-alias 'custom-button-pressed) 
     1945 
     1946(defface custom-button-pressed-unraised 
     1947  '((default :inherit custom-button-unraised) 
     1948    (((class color) (background light)) :foreground "magenta4") 
     1949    (((class color) (background dark)) :foreground "violet")) 
     1950  "Face for pressed custom buttons if `custom-raised-buttons' is nil." 
     1951  :version "22.1" 
     1952  :group 'custom-faces) 
     1953 
     1954(setq custom-button-pressed 
     1955  (if custom-raised-buttons 
     1956      'custom-button-pressed 
     1957    'custom-button-pressed-unraised)) 
    19161958 
    19171959(defface custom-documentation nil 
     
    42464288    (define-key map "n" 'widget-forward) 
    42474289    (define-key map "p" 'widget-backward) 
    4248     (define-key map [mouse-1] 'Custom-move-and-invoke) 
     4290    (define-key map [mouse-1] 'widget-move-and-invoke) 
    42494291    map) 
    42504292  "Keymap for `custom-mode'.") 
    4251  
    4252 (defun Custom-move-and-invoke (event) 
    4253   "Move to where you click, and if it is an active field, invoke it." 
    4254   (interactive "e") 
    4255   (mouse-set-point event) 
    4256   (if (widget-event-point event) 
    4257       (let* ((pos (widget-event-point event)) 
    4258              (button (get-char-property pos 'button))) 
    4259         (if button 
    4260             (widget-button-click event))))) 
    42614293 
    42624294(easy-menu-define Custom-mode-menu 
     
    43224354  (setq widget-documentation-face 'custom-documentation) 
    43234355  (make-local-variable 'widget-button-face) 
    4324   (setq widget-button-face 'custom-button) 
    4325   (set (make-local-variable 'widget-button-pressed-face) 'custom-button-pressed) 
    4326   (set (make-local-variable 'widget-mouse-face) 
    4327        'custom-button-pressed)          ; buttons `depress' when moused 
     4356  (setq widget-button-face custom-button) 
     4357  (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed) 
     4358  (if custom-raised-buttons 
     4359      (set (make-local-variable 'widget-mouse-face) custom-button)) 
     4360 
    43284361  ;; When possible, use relief for buttons, not bracketing.  This test 
    43294362  ;; may not be optimal.