Function: custom-toggle-hide-all-widgets

custom-toggle-hide-all-widgets is an interactive and byte-compiled function defined in cus-edit.el.gz.

Signature

(custom-toggle-hide-all-widgets)

Documentation

Hide or show details of all customizable settings in a Custom buffer.

This command is for use in a Custom buffer that shows many customizable settings, like "*Customize Group*" or "*Customize Faces*". It toggles the display of each of the customizable settings in the buffer between the expanded view, where the values of the settings and the value menus to change them are visible; and the concise view, where only the minimal details are shown, usually the name, the doc string and little else.

Probably introduced at or before Emacs version 29.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
(defun custom-toggle-hide-all-widgets ()
  "Hide or show details of all customizable settings in a Custom buffer.
This command is for use in a Custom buffer that shows many
customizable settings, like \"*Customize Group*\" or \"*Customize Faces*\".
It toggles the display of each of the customizable settings in the buffer
between the expanded view, where the values of the settings and the value
menus to change them are visible; and the concise view, where only the
minimal details are shown, usually the name, the doc string and little
else."
  (interactive)
  (save-excursion
    (goto-char (point-min))
    ;; Surely there's a better way to find all the "top level" widgets
    ;; in a buffer, but I couldn't find it.
    (while (not (eobp))
      (when-let* ((widget (widget-at (point)))
                  (parent (widget-get widget :parent))
                  (state (widget-get parent :custom-state)))
        (when (eq state 'changed)
          (setq state 'standard))
        (when (and (eq (widget-type widget) 'custom-visibility)
                   (eq state custom--hidden-state))
          (custom-toggle-parent widget)))
      (forward-line 1)))
  (setq custom--hidden-state (if (eq custom--hidden-state 'hidden)
                                 'standard
                               'hidden))
  (if (eq custom--hidden-state 'hidden)
      (message "All variables hidden")
    (message "All variables shown")))