# HG changeset patch # User Chong Yidong # Date 1135994643 0 # Node ID 87b213a028b37ce2df8e226693cb6ab1aed811cd # Parent b7d695ec282af64c5769e18b3a72e885a2fe3f15 * cus-theme.el (custom-new-theme-mode-map): New variable. diff -r b7d695ec282a -r 87b213a028b3 lisp/ChangeLog --- 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 * cus-theme.el (custom-new-theme-mode): Use cus-edit faces. + (custom-new-theme-mode-map): New variable. 2005-12-30 Richard M. Stallman diff -r b7d695ec282a -r 87b213a028b3 lisp/cus-theme.el --- 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)