comparison lisp/cus-theme.el @ 67950:87b213a028b3

* cus-theme.el (custom-new-theme-mode-map): New variable.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 31 Dec 2005 02:04:03 +0000
parents b7d695ec282a
children 1bae1f8d1fd0
comparison
equal deleted inserted replaced
67949:b7d695ec282a 67950:87b213a028b3
29 (require 'cus-edit) 29 (require 'cus-edit)
30 30
31 (eval-when-compile 31 (eval-when-compile
32 (require 'wid-edit)) 32 (require 'wid-edit))
33 33
34 (defvar custom-new-theme-mode-map
35 ;; This keymap should be dense, but a dense keymap would prevent inheriting
36 ;; "\r" bindings from the parent map.
37 ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26.
38 (let ((map (make-keymap)))
39 (set-keymap-parent map widget-keymap)
40 (suppress-keymap map)
41 (define-key map "n" 'widget-forward)
42 (define-key map "p" 'widget-backward)
43 (define-key map [mouse-1] 'widget-move-and-invoke)
44 map)
45 "Keymap for `custom-new-theme-mode'.")
46
34 (define-derived-mode custom-new-theme-mode nil "New-Theme" 47 (define-derived-mode custom-new-theme-mode nil "New-Theme"
35 "Major mode for the buffer created by `customize-create-theme'. 48 "Major mode for the buffer created by `customize-create-theme'.
36 Do not call this mode function yourself. It is only meant for internal 49 Do not call this mode function yourself. It is only meant for internal
37 use by `customize-create-theme'." 50 use by `customize-create-theme'."
38 (set-keymap-parent custom-new-theme-mode-map widget-keymap) 51 (use-local-map custom-new-theme-mode-map)
52 (define-key custom-new-theme-mode-map [mouse-1] 'widget-move-and-invoke)
39 (set (make-local-variable 'widget-documentation-face) 'custom-documentation) 53 (set (make-local-variable 'widget-documentation-face) 'custom-documentation)
40 (set (make-local-variable 'widget-button-face) custom-button) 54 (set (make-local-variable 'widget-button-face) custom-button)
41 (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed) 55 (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed)
42 (if custom-raised-buttons 56 (if custom-raised-buttons
43 (set (make-local-variable 'widget-mouse-face) custom-button)) 57 (set (make-local-variable 'widget-mouse-face) custom-button))