changeset 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
files lisp/ChangeLog lisp/cus-theme.el
diffstat 2 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Dec 31 01:59:02 2005 +0000
+++ b/lisp/ChangeLog	Sat Dec 31 02:04:03 2005 +0000
@@ -1,6 +1,7 @@
 2005-12-30  Chong Yidong  <cyd@stupidchicken.com>
 
 	* cus-theme.el (custom-new-theme-mode): Use cus-edit faces.
+	(custom-new-theme-mode-map): New variable.
 
 2005-12-30  Richard M. Stallman  <rms@gnu.org>
 
--- a/lisp/cus-theme.el	Sat Dec 31 01:59:02 2005 +0000
+++ b/lisp/cus-theme.el	Sat Dec 31 02:04:03 2005 +0000
@@ -31,11 +31,25 @@
 (eval-when-compile
   (require 'wid-edit))
 
+(defvar custom-new-theme-mode-map
+  ;; This keymap should be dense, but a dense keymap would prevent inheriting
+  ;; "\r" bindings from the parent map.
+  ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26.
+  (let ((map (make-keymap)))
+    (set-keymap-parent map widget-keymap)
+    (suppress-keymap map)
+    (define-key map "n" 'widget-forward)
+    (define-key map "p" 'widget-backward)
+    (define-key map [mouse-1] 'widget-move-and-invoke)
+    map)
+  "Keymap for `custom-new-theme-mode'.")
+
 (define-derived-mode custom-new-theme-mode nil "New-Theme"
   "Major mode for the buffer created by `customize-create-theme'.
 Do not call this mode function yourself.  It is only meant for internal
 use by `customize-create-theme'."
-  (set-keymap-parent custom-new-theme-mode-map widget-keymap)
+  (use-local-map custom-new-theme-mode-map)
+  (define-key custom-new-theme-mode-map [mouse-1] 'widget-move-and-invoke)
   (set (make-local-variable 'widget-documentation-face) 'custom-documentation)
   (set (make-local-variable 'widget-button-face) custom-button)
   (set (make-local-variable 'widget-button-pressed-face) custom-button-pressed)