Commit 87434e7a authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(customize-mode): New command.

parent 29512a0f
......@@ -841,6 +841,27 @@ are shown; the contents of those subgroups are initially hidden."
(customize-group 'emacs))
(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."
(let ((completion-regexp-list '("-mode\\'"))
(group (custom-group-of-mode major-mode)))
(if (and group (not current-prefix-arg))
(completing-read (if group
(format "Major mode (default %s): " major-mode)
"Major mode: ")
t nil nil (if group (symbol-name major-mode))))))))
(customize-group (custom-group-of-mode mode)))
(defun customize-group (group)
"Customize GROUP, which must be a customization group."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment