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-theme.el


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/cus-theme.el
Date: Sat, 31 Dec 2005 02:04:04 +0000

Index: emacs/lisp/cus-theme.el
diff -u emacs/lisp/cus-theme.el:1.15 emacs/lisp/cus-theme.el:1.16
--- emacs/lisp/cus-theme.el:1.15        Sat Dec 31 01:59:02 2005
+++ emacs/lisp/cus-theme.el     Sat Dec 31 02:04:03 2005
@@ -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)




reply via email to

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