diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2002-10-10 13:10:53 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2002-10-10 13:10:53 +0000 |
commit | 87434e7a58dff62fb24c0fa123cd6f00b5569afd (patch) | |
tree | 7f13def9e57cc0490da8db673b8244e300c05c94 /lisp/cus-edit.el | |
parent | 29512a0f3fa93d7e59d072cd5ca4064355c3b58e (diff) | |
download | emacs-87434e7a58dff62fb24c0fa123cd6f00b5569afd.tar.gz |
(customize-mode): New command.
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r-- | lisp/cus-edit.el | 21 |
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)) |