summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2002-10-10 13:10:53 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2002-10-10 13:10:53 +0000
commit87434e7a58dff62fb24c0fa123cd6f00b5569afd (patch)
tree7f13def9e57cc0490da8db673b8244e300c05c94 /lisp/cus-edit.el
parent29512a0f3fa93d7e59d072cd5ca4064355c3b58e (diff)
downloademacs-87434e7a58dff62fb24c0fa123cd6f00b5569afd.tar.gz
(customize-mode): New command.
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 58fd8b16ba9..366061a7e59 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -842,6 +842,27 @@ are shown; the contents of those subgroups are initially hidden."
(customize-group 'emacs))
;;;###autoload
+(defun customize-mode (mode)
+ "Customize options related to the current major mode.
+If a prefix \\[universal-argument] was given (or if the current major mode has no known group),
+then prompt for the MODE to customize."
+ (interactive
+ (list
+ (let ((completion-regexp-list '("-mode\\'"))
+ (group (custom-group-of-mode major-mode)))
+ (if (and group (not current-prefix-arg))
+ major-mode
+ (intern
+ (completing-read (if group
+ (format "Major mode (default %s): " major-mode)
+ "Major mode: ")
+ obarray
+ 'custom-group-of-mode
+ t nil nil (if group (symbol-name major-mode))))))))
+ (customize-group (custom-group-of-mode mode)))
+
+
+;;;###autoload
(defun customize-group (group)
"Customize GROUP, which must be a customization group."
(interactive (list (let ((completion-ignore-case t))