Changeset 3939 for vendor/emacs-CVS_HEAD/lisp/cus-edit.el
- Timestamp:
- 11/01/05 07:08:22 (3 years ago)
- Files:
-
- vendor/emacs-CVS_HEAD/lisp/cus-edit.el (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
vendor/emacs-CVS_HEAD/lisp/cus-edit.el
r3892 r3939 1378 1378 (quit-window custom-buffer-done-kill)) 1379 1379 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 1380 1386 (defcustom custom-raised-buttons (not (equal (face-valid-attribute-values :box) 1381 1387 '(("unspecified" . unspecified)))) … … 1384 1390 :type 'boolean 1385 1391 :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)))) 1387 1401 1388 1402 (defun custom-buffer-create-internal (options &optional description) … … 1897 1911 (t 1898 1912 nil)) 1899 "Face used for buttons in customization buffers."1913 "Face for custom buffer buttons if `custom-raised-buttons' is non-nil." 1900 1914 :version "21.1" 1901 1915 :group 'custom-faces) 1902 1916 ;; backward-compatibility alias 1903 1917 (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)) 1904 1933 1905 1934 (defface custom-button-pressed … … 1909 1938 (t 1910 1939 (:inverse-video t))) 1911 "Face used for buttons in customization buffers."1940 "Face for pressed custom buttons if `custom-raised-buttons' is non-nil." 1912 1941 :version "21.1" 1913 1942 :group 'custom-faces) 1914 1943 ;; backward-compatibility alias 1915 1944 (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)) 1916 1958 1917 1959 (defface custom-documentation nil … … 4246 4288 (define-key map "n" 'widget-forward) 4247 4289 (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) 4249 4291 map) 4250 4292 "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 button4260 (widget-button-click event)))))4261 4293 4262 4294 (easy-menu-define Custom-mode-menu … … 4322 4354 (setq widget-documentation-face 'custom-documentation) 4323 4355 (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 4328 4361 ;; When possible, use relief for buttons, not bracketing. This test 4329 4362 ;; may not be optimal.
