# HG changeset patch # User Martin Rudalics # Date 1195458604 0 # Node ID 74f276f67957230ab53e344baea407e1cc7eeb39 # Parent b4b52674ba3c3a57d21baa5a0537805c83df3bf9 (custom-field-keymap): Move to other Custom mode keymaps such that it's before the definition of Custom-mode-menu. (Custom-mode-menu): Show it for custom-field-keymap too. diff -r b4b52674ba3c -r 74f276f67957 lisp/cus-edit.el --- a/lisp/cus-edit.el Mon Nov 19 07:48:56 2007 +0000 +++ b/lisp/cus-edit.el Mon Nov 19 07:50:04 2007 +0000 @@ -491,6 +491,14 @@ map) "Local keymap for links in `custom-mode'.") +(defvar custom-field-keymap + (let ((map (copy-keymap widget-field-keymap))) + (define-key map "\C-c\C-c" 'Custom-set) + (define-key map "\C-x\C-s" 'Custom-save) + map) + "Keymap used inside editable fields in customization buffers.") + +(widget-put (get 'editable-field 'widget-type) :keymap custom-field-keymap) ;;; Utilities. @@ -4438,7 +4446,7 @@ ;;; Toolbar and menubar support (easy-menu-define - Custom-mode-menu custom-mode-map + Custom-mode-menu (list custom-mode-map custom-field-keymap) "Menu used in customization buffers." (nconc (list "Custom" (customize-menu-create 'customize)) @@ -4476,15 +4484,6 @@ (widget-apply-action button event) (error "You can't edit this part of the Custom buffer")))) -(defvar custom-field-keymap - (let ((map (copy-keymap widget-field-keymap))) - (define-key map "\C-c\C-c" 'Custom-set) - (define-key map "\C-x\C-s" 'Custom-save) - map) - "Keymap used inside editable fields in customization buffers.") - -(widget-put (get 'editable-field 'widget-type) :keymap custom-field-keymap) - (defun Custom-goto-parent () "Go to the parent group listed at the top of this buffer. If several parents are listed, go to the first of them."