aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-08-16 05:05:08 +0000
committerRichard M. Stallman2006-08-16 05:05:08 +0000
commit19f0515adac3bc3b0ffa371fb92350bdb0b5fd15 (patch)
tree46875a30b93e10c0e36af33bde8b3949066bb9c2
parent27f9dfbf21276dab85c3a2ff229d3188af8bf0e3 (diff)
downloademacs-19f0515adac3bc3b0ffa371fb92350bdb0b5fd15.tar.gz
emacs-19f0515adac3bc3b0ffa371fb92350bdb0b5fd15.zip
(custom-newline): New function.
(custom-mode-map): Bind newline to custom-newline.
-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."