changeset 71847:61f3d6be1e92

(custom-no-edit): New command. (custom-mode-map): Remap to custom-no-edit instead of using suppress-keymap.
author Richard M. Stallman <rms@gnu.org>
date Wed, 12 Jul 2006 15:56:33 +0000
parents 3c725926a775
children 067fc0d0be7e
files lisp/cus-edit.el
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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."