Function: Custom-mode
Custom-mode is an interactive and byte-compiled function defined in
cus-edit.el.gz.
Signature
(Custom-mode)
Documentation
Major mode for editing customization buffers.
The following commands are available:
Move to next button, link or editable field. TAB (widget-forward)
Move to previous button, link or editable field. S-<tab> (widget-backward)
Complete content of editable text field. C-M-i (widget-complete)
Invoke button under the mouse pointer. <down-mouse-1> (widget-button-click)
Invoke button under point. M-x widget-button-press (widget-button-press)
Set all options from current text. C-c C-c (Custom-set)
Make values in current text permanent. C-x C-s (Custom-save)
Make text match actual option values. M-x Custom-reset-current (Custom-reset-current)
Reset options to permanent settings. M-x Custom-reset-saved (Custom-reset-saved)
Erase customizations; set options
and buffer text to the standard values. M-x Custom-reset-standard (Custom-reset-standard)
Entry to this mode calls the value of Custom-mode-hook
if that value is non-nil.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
(define-derived-mode Custom-mode nil "Custom"
"Major mode for editing customization buffers.
The following commands are available:
\\<widget-keymap>\
Move to next button, link or editable field. \\[widget-forward]
Move to previous button, link or editable field. \\[widget-backward]
\\<custom-field-keymap>\
Complete content of editable text field. \\[widget-complete]
\\<custom-mode-map>\
Invoke button under the mouse pointer. \\[widget-button-click]
Invoke button under point. \\[widget-button-press]
Set all options from current text. \\[Custom-set]
Make values in current text permanent. \\[Custom-save]
Make text match actual option values. \\[Custom-reset-current]
Reset options to permanent settings. \\[Custom-reset-saved]
Erase customizations; set options
and buffer text to the standard values. \\[Custom-reset-standard]
Entry to this mode calls the value of `Custom-mode-hook'
if that value is non-nil."
(use-local-map custom-mode-map)
(setq-local tool-bar-map
(or custom-tool-bar-map
;; Set up `custom-tool-bar-map'.
(let ((map (make-sparse-keymap)))
(mapc
(lambda (arg)
(tool-bar-local-item-from-menu
(nth 1 arg) (nth 4 arg) map custom-mode-map
:label (nth 5 arg)))
custom-commands)
(setq custom-tool-bar-map map))))
(setq-local custom--invocation-options nil
custom--hidden-state 'hidden)
(setq-local revert-buffer-function #'custom--revert-buffer)
(make-local-variable 'custom-options)
(make-local-variable 'custom-local-buffer)
(custom--initialize-widget-variables)
(add-hook 'widget-edit-functions 'custom-state-buffer-message nil t))