# HG changeset patch # User Richard M. Stallman # Date 1152719793 0 # Node ID 61f3d6be1e9239334bcbb8b09079cd7130e6e07c # Parent 3c725926a775c47d0bb027dfdf56b5792b325c64 (custom-no-edit): New command. (custom-mode-map): Remap to custom-no-edit instead of using suppress-keymap. diff -r 3c725926a775 -r 61f3d6be1e92 lisp/cus-edit.el --- a/lisp/cus-edit.el Wed Jul 12 13:22:36 2006 +0000 +++ b/lisp/cus-edit.el Wed Jul 12 15:56:33 2006 +0000 @@ -4419,7 +4419,9 @@ ;; 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 @@ 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."