Mercurial > emacs
changeset 47823:4649d9cb92dd
(customize-mode): New command.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 10 Oct 2002 13:10:53 +0000 |
parents | 46f8bf0fc7b4 |
children | f9a9cf859646 |
files | lisp/cus-edit.el |
diffstat | 1 files changed, 21 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/cus-edit.el Thu Oct 10 13:09:13 2002 +0000 +++ b/lisp/cus-edit.el Thu Oct 10 13:10:53 2002 +0000 @@ -842,6 +842,27 @@ (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))