File: cus-edit.el.html

This file implements the code to create and edit customize buffers.

See custom.el.

No commands should have names starting with custom- because that interferes with completion. Use customize- for commands that the user will run with M-x, and Custom- for interactive commands.

The identity of a customize option is represented by a Lisp symbol. The following values are associated with an option.

0. The current value.

   This is the value of the option as seen by "the rest of Emacs".

   Usually extracted by 'default-value', but can be extracted with
   different means if the option symbol has the 'custom-get'
   property. Similarly, set-default (or the 'custom-set' property)
   can set it.

1. The widget value.

   This is the value shown in the widget in a customize buffer.

2. The customized value.

   This is the last value given to the option through customize.

   It is stored in the 'customized-value' property of the option, in a
   cons-cell whose car evaluates to the customized value.

3. The saved value.

   This is last value saved from customize.

   It is stored in the 'saved-value' property of the option, in a
   cons-cell whose car evaluates to the saved value.

4. The standard value.

   This is the value given in the 'defcustom' declaration.

   It is stored in the 'standard-value' property of the option, in a
   cons-cell whose car evaluates to the standard value.

5. The "think" value.

   This is what customize thinks the current value should be.

   This is the customized value, if any such value exists, otherwise
   the saved value, if that exists, and as a last resort the standard
   value.

The reason for storing values unevaluated: This is so you can have values that depend on the environment. For example, you can have a variable that has one value when Emacs is running under a window system, and another value on a tty. Since the evaluation is only done when the variable is first initialized, this is only relevant for the saved (and standard) values, but affect others values for compatibility.

You can see (and modify and save) this unevaluated value by selecting
"Show Saved Lisp Expression" from the Lisp interface. This will
give you the unevaluated saved value, if any, otherwise the unevaluated standard value.

The possible states for a customize widget are:

0. unknown

   The state has not been determined yet.

1. modified

   The widget value is different from the current value.

2. changed

   The current value is different from the "think" value.

3. set

   The "think" value is the customized value.

4. saved

   The "think" value is the saved value.

5. standard

   The "think" value is the standard value.

6. rogue

   There is no standard value. This means that the variable was
   not defined with defcustom, nor handled in cus-start.el. Most
   standard interactive Custom commands do not let you create a
   Custom buffer containing such variables. However, such Custom
   buffers can be created, for instance, by calling
   customize-apropos with a prefix arg or by calling
   customize-option non-interactively.

7. hidden

   There is no widget value.

8. mismatch

   The widget value is not valid member of the :type specified for the
   option.

Defined variables (72)

Custom-dirlocals-menuMenu used in dirlocals customization buffers.
Custom-dirlocals-mode-abbrev-tableAbbrev table for ‘Custom-dirlocals-mode’.
Custom-dirlocals-mode-hookHook run after entering ‘Custom-dirlocals-mode’.
Custom-dirlocals-mode-mapKeymap used in the "*Customize Dirlocals*" buffer.
Custom-dirlocals-mode-syntax-tableSyntax table for ‘Custom-dirlocals-mode’.
Custom-mode-abbrev-tableAbbrev table for ‘Custom-mode’.
Custom-mode-hookHook called when entering Custom mode.
Custom-mode-mapKeymap for ‘Custom-mode’.
Custom-mode-menuMenu used in customization buffers.
Custom-mode-syntax-tableSyntax table for ‘Custom-mode’.
custom-actioned-widgetWidget for which to show the menu of available actions.
custom-browse-only-groupsIf non-nil, show group members only within each customization group.
custom-browse-order-groupsIf non-nil, order group members within each customization group.
custom-browse-sort-alphabeticallyIf non-nil, sort customization group alphabetically in ‘custom-browse’.
custom-buffer-done-killNon-nil means exiting a Custom buffer should kill it.
custom-buffer-indentNumber of spaces to indent nested groups.
custom-buffer-order-groupsIf non-nil, order group members within each customization group.
custom-buffer-sort-alphabeticallyWhether to sort customization groups alphabetically in Custom buffer.
custom-buffer-styleControl the presentation style for customization buffers.
custom-buffer-verbose-helpIf non-nil, include explanatory text in the customization buffer.
custom-buttonFace used for buttons in customization buffers.
custom-button-mouseMouse face used for buttons in customization buffers.
custom-button-pressedFace used for pressed buttons in customization buffers.
custom-command-buttonsA list that holds the buttons that act on all settings in a Custom buffer.
custom-commandsAlist of specifications for Customize menu items, tool bar icons and buttons.
custom-dirlocals-commandsAlist of specifications for Customize menu items, tool bar icons and buttons.
custom-dirlocals-field-mapKeymap for the editable fields in the "*Customize Dirlocals*" buffer .
custom-dirlocals-file-widgetWidget that holds the name of the dir-locals file being customized.
custom-dirlocals-mapKeymap used in the "*Customize Dirlocals*" buffer.
custom-dirlocals-tool-bar-mapKeymap for the toolbar in "*Customize Dirlocals*" buffer.
custom-dirlocals-widgetWidget that holds the dir-locals customizations.
custom-face--font-cache-timeoutRefresh the cache of font families after at most this many seconds.
custom-face-allConverted version of the ‘custom-face-all’ widget.
custom-face-default-formDefault form of displaying face definition.
custom-face-editConverted version of the ‘custom-face-edit’ widget.
custom-face-extended-menuA menu for ‘custom-face’ widgets.
custom-face-menuIf non-nil, an alist of actions for the ‘custom-face’ widget.
custom-field-keymapKeymap used inside editable fields in customization buffers.
custom-fileFile used for storing customization information.
custom-group-extended-menuA menu for ‘custom-group’ widgets.
custom-group-menuIf non-nil, an alist of actions for the ‘custom-group’ widget.
custom-group-tag-facesFace used for group tags.
custom-guess-doc-alistAlist of (MATCH TYPE).
custom-guess-name-alistAlist of (MATCH TYPE).
custom-icon-extended-menuA menu for ‘custom-icon’ widgets.
custom-magic-alistAlist of customize option states.
custom-magic-showIf non-nil, show textual description of the state.
custom-magic-show-buttonShow a "magic" button indicating the state of each customization option.
custom-magic-show-hiddenControl whether the State button is shown for hidden items.
custom-menu-nestingMaximum nesting in custom menus.
custom-menu-order-groupsIf non-nil, order group members within each customization group.
custom-menu-sort-alphabeticallyIf non-nil, sort each customization group alphabetically in menus.
custom-mode-link-mapLocal keymap for links in ‘Custom-mode’.
custom-mode-mapKeymap for ‘Custom-mode’.
custom-optionsCustomization widgets in the current buffer.
custom-prefix-listList of prefixes that should be ignored by ‘custom-unlispify’.
custom-raised-buttonsIf non-nil, indicate active buttons in a raised-button style.
custom-reset-button-menuIf non-nil, only show a single reset button in customize buffers.
custom-reset-extended-menuA menu for the "Revert..." button.
custom-reset-menuIf non-nil, an alist of actions for the ‘Reset’ button.
custom-search-fieldIf non-nil, show a search field in Custom buffers.
custom-tool-bar-mapKeymap for toolbar in Custom mode.
custom-unlispify-menu-entriesDisplay menu entries as words instead of symbols if non-nil.
custom-unlispify-remove-prefixesNon-nil means remove group prefixes from option names in buffer.
custom-unlispify-tag-namesDisplay tag names as words instead of symbols if non-nil.
custom-variable-default-formDefault form of displaying variable values.
custom-variable-extended-menuA menu for ‘custom-variable’ widgets.
custom-variable-menuIf non-nil, an alist of actions for the ‘custom-variable’ widget.
customize-changed-options-previous-releaseVersion for ‘customize-changed’ to refer back to by default.
customize-package-emacs-version-alistAlist mapping versions of a package to Emacs versions.
widget-face-prompt-value-historyHistory of input to ‘widget-face-prompt-value’.
widget-fringe-bitmap-prompt-value-historyHistory of input to ‘widget-fringe-bitmap-prompt-value’.

Defined functions (208)

Custom-buffer-done(&rest IGNORE)
Custom-dirlocals-menu(ARG1)
Custom-dirlocals-mode()
Custom-dirlocals-revert-buffer(&rest IGNORED)
Custom-dirlocals-save(&rest IGNORE)
Custom-display-on-screen-keyboard-p()
Custom-goto-parent()
Custom-help()
Custom-mode()
Custom-mode-menu(ARG1)
Custom-newline(POS &optional EVENT)
Custom-no-edit(POS &optional EVENT)
Custom-reset-current(&rest IGNORE)
Custom-reset-saved(&rest IGNORE)
Custom-reset-standard(&rest IGNORE)
Custom-save(&rest IGNORE)
Custom-set(&rest IGNORE)
cus--face-link(WIDGET FORMAT)
custom--editable-field-p(WIDGET)
custom--filter-obsolete-variables(ITEMS)
custom--icons-widget-value(WIDGET)
custom--revert-buffer(IGNORE-AUTO NOCONFIRM)
custom-add-parent-links(WIDGET &optional INITIAL-STRING DOC-INITIAL-STRING)
custom-add-see-also(WIDGET &optional PREFIX)
custom-browse-face-tag-action(WIDGET &rest IGNORE)
custom-browse-group-tag-action(WIDGET &rest IGNORE)
custom-browse-insert-prefix(PREFIX)
custom-browse-variable-tag-action(WIDGET &rest IGNORE)
custom-browse-visibility-action(WIDGET &rest IGNORE)
custom-buffer-create(OPTIONS &optional NAME DESCRIPTION)
custom-buffer-create-internal(OPTIONS &optional DESCRIPTION)
custom-buffer-create-other-window(OPTIONS &optional NAME DESCRIPTION)
custom-command-apply(FUN QUERY &optional STRONG-QUERY)
custom-comment-create(WIDGET)
custom-comment-hide(WIDGET)
custom-comment-invisible-p(WIDGET)
custom-comment-preserve(WIDGET)
custom-comment-show(WIDGET)
custom-convert-widget(WIDGET)
custom-dirlocals--set-widget-vars()
custom-dirlocals-change-file(WIDGET &optional EVENT)
custom-dirlocals-get-options()
custom-dirlocals-maybe-update-cons()
custom-dirlocals-symbol-action(WIDGET &optional EVENT)
custom-dirlocals-validate()
custom-dirlocals-with-buffer(&rest BODY)
custom-dynamic-cons-value-create(WIDGET)
custom-face--font-completion(STRING PRED ACTION)
custom-face-action(WIDGET &optional EVENT)
custom-face-documentation(FACE)
custom-face-edit-activate(WIDGET)
custom-face-edit-all(WIDGET)
custom-face-edit-attribute-tag(WIDGET)
custom-face-edit-convert-widget(WIDGET)
custom-face-edit-deactivate(WIDGET)
custom-face-edit-delete(WIDGET)
custom-face-edit-fix-value(WIDGET VALUE)
custom-face-edit-lisp(WIDGET)
custom-face-edit-selected(WIDGET)
custom-face-edit-value-create(WIDGET)
custom-face-edit-value-visibility-action(WIDGET &rest IGNORE)
custom-face-get-current-spec(FACE)
custom-face-get-current-spec-unfiltered(FACE)
custom-face-mark-to-reset-standard(WIDGET)
custom-face-mark-to-save(WIDGET)
custom-face-menu-create(WIDGET SYMBOL)
custom-face-reset-saved(WIDGET)
custom-face-reset-standard(WIDGET)
custom-face-save(WIDGET)
custom-face-set(WIDGET)
custom-face-standard-value(WIDGET)
custom-face-state(FACE)
custom-face-state-set(WIDGET &optional NO-FILTER)
custom-face-state-set-and-redraw(WIDGET)
custom-face-value-create(WIDGET)
custom-face-widget-to-spec(WIDGET)
custom-file(&optional NO-ERROR)
custom-filter-face-spec(SPEC FILTER-INDEX &optional DEFAULT-FILTER)
custom-get-fresh-buffer(NAME)
custom-group--draw-horizontal-line()
custom-group-action(WIDGET &optional EVENT)
custom-group-link-action(WIDGET &rest IGNORE)
custom-group-mark-to-reset-standard(WIDGET)
custom-group-mark-to-save(WIDGET)
custom-group-members(SYMBOL GROUPS-ONLY)
custom-group-menu-create(WIDGET SYMBOL)
custom-group-reset-current(WIDGET)
custom-group-reset-saved(WIDGET)
custom-group-reset-standard(WIDGET)
custom-group-sample-face-get(WIDGET)
custom-group-save(WIDGET)
custom-group-set(WIDGET)
custom-group-state-set-and-redraw(WIDGET)
custom-group-state-update(WIDGET)
custom-group-value-create(WIDGET)
custom-group-visibility-create(WIDGET)
custom-guess-type(SYMBOL)
custom-hook-convert-widget(WIDGET)
custom-icon-action(WIDGET &optional EVENT)
custom-icon-mark-to-reset-standard(WIDGET)
custom-icon-mark-to-save(WIDGET)
custom-icon-reset-saved(WIDGET)
custom-icon-reset-standard(WIDGET)
custom-icon-save(WIDGET)
custom-icon-set(WIDGET)
custom-icon-state(SYMBOL VALUE)
custom-icon-state-set(WIDGET &optional STATE)
custom-icon-state-set-and-redraw(WIDGET)
custom-icon-value-create(WIDGET)
custom-load-widget(WIDGET)
custom-magic-reset(WIDGET &optional BUFFER)
custom-magic-value-create(WIDGET)
custom-menu-create(SYMBOL)
custom-menu-filter(MENU WIDGET)
custom-notify(WIDGET &rest ARGS)
custom-post-filter-face-spec(SPEC)
custom-pre-filter-face-spec(SPEC)
custom-prefix-add(SYMBOL PREFIXES)
custom-prompt-customize-unsaved-options()
custom-prompt-variable(PROMPT-VAR PROMPT-VAL &optional COMMENT)
custom-redraw(WIDGET)
custom-redraw-magic(WIDGET)
custom-reset(WIDGET &optional EVENT)
custom-reset-standard-save-and-update()
custom-save-all()
custom-save-delete(SYMBOL)
custom-save-faces()
custom-save-icons()
custom-save-variables()
custom-set-icons(&rest ARGS)
custom-show(WIDGET VALUE)
custom-sort-items(ITEMS SORT-ALPHABETICALLY ORDER-GROUPS)
custom-split-regexp-maybe(REGEXP)
custom-state-buffer-message(WIDGET)
custom-tag-action(WIDGET &rest ARGS)
custom-tag-mouse-down-action(WIDGET &rest ARGS)
custom-theme-set-icons(THEME &rest SPECS)
custom-toggle-hide(WIDGET)
custom-toggle-hide-all-widgets()
custom-toggle-hide-face(VISIBILITY-WIDGET &rest IGNORE)
custom-toggle-hide-icon(VISIBILITY-WIDGET &rest IGNORE)
custom-toggle-hide-variable(VISIBILITY-WIDGET &rest IGNORE)
custom-toggle-parent(WIDGET &rest IGNORE)
custom-unlispify-menu-entry(SYMBOL &optional NO-SUFFIX)
custom-unlispify-tag-name(SYMBOL)
custom-unloaded-symbol-p(SYMBOL)
custom-unloaded-widget-p(WIDGET)
custom-unsaved-options()
custom-variable-action(WIDGET &optional EVENT)
custom-variable-backup-value(WIDGET)
custom-variable-current-value(WIDGET)
custom-variable-documentation(VARIABLE)
custom-variable-edit(WIDGET)
custom-variable-edit-lisp(WIDGET)
custom-variable-mark-to-reset-standard(WIDGET)
custom-variable-mark-to-save(WIDGET)
custom-variable-menu-create(WIDGET SYMBOL)
custom-variable-modified-p(WIDGET)
custom-variable-prompt()
custom-variable-reset-backup(WIDGET)
custom-variable-reset-saved(WIDGET)
custom-variable-reset-standard(WIDGET)
custom-variable-save(WIDGET)
custom-variable-set(WIDGET)
custom-variable-standard-value(WIDGET)
custom-variable-state(SYMBOL VAL)
custom-variable-state-set(WIDGET &optional STATE)
custom-variable-state-set-and-redraw(WIDGET)
custom-variable-type(SYMBOL)
custom-variable-value-create(WIDGET)
customize()
customize-apropos(PATTERN &optional TYPE)
customize-apropos-faces(REGEXP)
customize-apropos-groups(REGEXP)
customize-apropos-options(REGEXP &optional IGNORED)
customize-browse(&optional GROUP)
customize-changed(&optional SINCE-VERSION)
customize-changed-options(&optional SINCE-VERSION)
customize-customized()
customize-dirlocals(&optional FILENAME)
customize-face(&optional FACE OTHER-WINDOW)
customize-face-other-window(&optional FACE)
customize-group(&optional GROUP OTHER-WINDOW)
customize-group-other-window(&optional GROUP)
customize-icon(ICON)
customize-menu-create(SYMBOL &optional NAME)
customize-mode(MODE)
customize-option(SYMBOL)
customize-option-other-window(SYMBOL)
customize-package-emacs-version(SYMBOL PACKAGE-VERSION)
customize-push-and-save(LIST-VAR ELTS)
customize-rogue()
customize-save-customized()
customize-save-variable(VARIABLE VALUE &optional COMMENT)
customize-saved()
customize-set-value(VARIABLE VALUE &optional COMMENT)
customize-set-variable(VARIABLE VALUE &optional COMMENT)
customize-toggle-option(SYMBOL)
customize-unsaved()
customize-variable(SYMBOL)
customize-variable-other-window(SYMBOL)
customize-version-lessp(VERSION1 VERSION2)
setopt([VARIABLE VALUE]...)
setopt--set(VARIABLE VALUE)
toggle-option(SYMBOL)
widget-face-notify(WIDGET CHILD &optional EVENT)
widget-face-sample-face-get(WIDGET)
widget-magic-mouse-down-action(WIDGET &optional EVENT)

Defined faces (25)

custom-buttonFace for custom buffer buttons if ‘custom-raised-buttons’ is non-nil.
custom-button-mouseMouse face for custom buffer buttons if ‘custom-raised-buttons’ is non-nil.
custom-button-pressedFace for pressed custom buttons if ‘custom-raised-buttons’ is non-nil.
custom-button-pressed-unraisedFace for pressed custom buttons if ‘custom-raised-buttons’ is nil.
custom-button-unraisedFace for custom buffer buttons if ‘custom-raised-buttons’ is nil.
custom-changedFace used when the customize item has been changed.
custom-commentFace used for comments on variables or faces.
custom-comment-tagFace used for the comment tag on variables or faces.
custom-documentationFace used for documentation strings in customization buffers.
custom-face-tagFace used for face tags.
custom-group-subtitleFace for the "Subgroups:" subtitle in Custom buffers.
custom-group-tagFace for low level group tags.
custom-group-tag-1Face for group tags.
custom-invalidFace used when the customize item is invalid.
custom-linkFace for links in customization buffers.
custom-modifiedFace used when the customize item has been modified.
custom-rogueFace used when the customize item is not defined for customization.
custom-savedFace used when the customize item has been saved.
custom-setFace used when the customize item has been set.
custom-stateFace used for State descriptions in the customize buffer.
custom-themedFace used when the customize item has been set by a theme.
custom-variable-buttonFace used for pushable variable tags.
custom-variable-obsoleteFace used for obsolete variables.
custom-variable-tagFace used for unpushable variable tags.
custom-visibilityFace for the ‘custom-visibility’ widget.