aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-07-12 15:56:33 +0000
committerRichard M. Stallman2006-07-12 15:56:33 +0000
commit0ce026b1d2cb332b6fbc377b6a218a15a5b3ae16 (patch)
tree43716878e73a16063d6e42fd864de28ee543cfe3
parente55deb0b2c90a9f6fb6c53adb56403d369174ee0 (diff)
downloademacs-0ce026b1d2cb332b6fbc377b6a218a15a5b3ae16.tar.gz
emacs-0ce026b1d2cb332b6fbc377b6a218a15a5b3ae16.zip
(custom-no-edit): New command.
(custom-mode-map): Remap to custom-no-edit instead of using suppress-keymap.
-rw-r--r--lisp/cus-edit.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index d7ffab4bc5b..15efbc5ab91 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4419,7 +4419,9 @@ The format is suitable for use with `easy-menu-define'."
4419 ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26. 4419 ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26.
4420 (let ((map (make-keymap))) 4420 (let ((map (make-keymap)))
4421 (set-keymap-parent map widget-keymap) 4421 (set-keymap-parent map widget-keymap)
4422 (suppress-keymap map) 4422 (define-key map [remap self-insert-command]
4423 'custom-no-edit)
4424 (define-key map "\^m" 'custom-no-edit)
4423 (define-key map " " 'scroll-up) 4425 (define-key map " " 'scroll-up)
4424 (define-key map "\177" 'scroll-down) 4426 (define-key map "\177" 'scroll-down)
4425 (define-key map "\C-c\C-c" 'Custom-set) 4427 (define-key map "\C-c\C-c" 'Custom-set)
@@ -4431,6 +4433,11 @@ The format is suitable for use with `easy-menu-define'."
4431 map) 4433 map)
4432 "Keymap for `custom-mode'.") 4434 "Keymap for `custom-mode'.")
4433 4435
4436(defun custom-no-edit ()
4437 "Refuse to allow editing of Custom buffer."
4438 (interactive)
4439 (error "You can't edit this part of the Custom buffer"))
4440
4434(easy-menu-define Custom-mode-menu 4441(easy-menu-define Custom-mode-menu
4435 custom-mode-map 4442 custom-mode-map
4436 "Menu used in customization buffers." 4443 "Menu used in customization buffers."