;; 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)
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."