From: Stefan Monnier Date: Thu, 10 Oct 2002 13:10:53 +0000 (+0000) Subject: (customize-mode): New command. X-Git-Tag: ttn-vms-21-2-B4~12881 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=87434e7a58dff62fb24c0fa123cd6f00b5569afd;p=emacs.git (customize-mode): New command. --- 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 @@ -841,6 +841,27 @@ are shown; the contents of those subgroups are initially hidden." (interactive) (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."