Don't try to toggle untogglable widgets in custom-toggle-hide-all-variables

* lisp/cus-edit.el (custom-toggle-hide-all-variables): Only toggle
the widgets that can be toggled.
This commit is contained in:
Lars Ingebrigtsen
2022-05-11 13:42:02 +02:00
parent 231cf5ee2b
commit 6e275c1bf8

View File

@@ -2851,7 +2851,10 @@ try matching its doc string against `custom-guess-doc-alist'."
(when-let* ((widget (widget-at (point)))
(parent (widget-get widget :parent))
(state (widget-get parent :custom-state)))
(when (eq state custom--hidden-state)
(when (eq state 'changed)
(setq state 'standard))
(when (and (eq (widget-type widget) 'custom-visibility)
(eq state custom--hidden-state))
(custom-toggle-hide-variable widget)))
(forward-line 1)))
(setq custom--hidden-state (if (eq custom--hidden-state 'hidden)