aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 0493dd0894c..609b5572a08 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4436,6 +4436,7 @@ The format is suitable for use with `easy-menu-define'."
4436 (let ((map (make-keymap))) 4436 (let ((map (make-keymap)))
4437 (set-keymap-parent map widget-keymap) 4437 (set-keymap-parent map widget-keymap)
4438 (define-key map [remap self-insert-command] 'custom-no-edit) 4438 (define-key map [remap self-insert-command] 'custom-no-edit)
4439 (define-key map "\^m" 'custom-newline)
4439 (define-key map " " 'scroll-up) 4440 (define-key map " " 'scroll-up)
4440 (define-key map "\177" 'scroll-down) 4441 (define-key map "\177" 'scroll-down)
4441 (define-key map "\C-c\C-c" 'Custom-set) 4442 (define-key map "\C-c\C-c" 'Custom-set)
@@ -4452,6 +4453,14 @@ The format is suitable for use with `easy-menu-define'."
4452 (interactive "@d") 4453 (interactive "@d")
4453 (error "You can't edit this part of the Custom buffer")) 4454 (error "You can't edit this part of the Custom buffer"))
4454 4455
4456(defun custom-newline (pos &optional event)
4457 "Invoke button at POS, or refuse to allow editing of Custom buffer."
4458 (interactive "@d")
4459 (let ((button (get-char-property pos 'button)))
4460 (if button
4461 (widget-apply-action button event)
4462 (error "You can't edit this part of the Custom buffer"))))
4463
4455(easy-menu-define Custom-mode-menu 4464(easy-menu-define Custom-mode-menu
4456 custom-mode-map 4465 custom-mode-map
4457 "Menu used in customization buffers." 4466 "Menu used in customization buffers."