(custom-no-edit): New command.
(custom-mode-map): Remap to custom-no-edit instead of using suppress-keymap.
This commit is contained in:
parent
e55deb0b2c
commit
0ce026b1d2
1 changed files with 8 additions and 1 deletions
|
@ -4419,7 +4419,9 @@ The format is suitable for use with `easy-menu-define'."
|
|||
;; 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 [remap self-insert-command]
|
||||
'custom-no-edit)
|
||||
(define-key map "\^m" 'custom-no-edit)
|
||||
(define-key map " " 'scroll-up)
|
||||
(define-key map "\177" 'scroll-down)
|
||||
(define-key map "\C-c\C-c" 'Custom-set)
|
||||
|
@ -4431,6 +4433,11 @@ The format is suitable for use with `easy-menu-define'."
|
|||
map)
|
||||
"Keymap for `custom-mode'.")
|
||||
|
||||
(defun custom-no-edit ()
|
||||
"Refuse to allow editing of Custom buffer."
|
||||
(interactive)
|
||||
(error "You can't edit this part of the Custom buffer"))
|
||||
|
||||
(easy-menu-define Custom-mode-menu
|
||||
custom-mode-map
|
||||
"Menu used in customization buffers."
|
||||
|
|
Loading…
Add table
Reference in a new issue