summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 15f43080aff..609b5572a08 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4435,9 +4435,8 @@ 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)
- (define-key map [remap self-insert-command]
- 'custom-no-edit)
- (define-key map "\^m" 'custom-no-edit)
+ (define-key map [remap self-insert-command] 'custom-no-edit)
+ (define-key map "\^m" 'custom-newline)
(define-key map " " 'scroll-up)
(define-key map "\177" 'scroll-down)
(define-key map "\C-c\C-c" 'Custom-set)
@@ -4452,6 +4451,11 @@ The format is suitable for use with `easy-menu-define'."
(defun custom-no-edit (pos &optional event)
"Invoke button at POS, or refuse to allow editing of Custom buffer."
(interactive "@d")
+ (error "You can't edit this part of the Custom buffer"))
+
+(defun custom-newline (pos &optional event)
+ "Invoke button at POS, or refuse to allow editing of Custom buffer."
+ (interactive "@d")
(let ((button (get-char-property pos 'button)))
(if button
(widget-apply-action button event)