]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't try to toggle untogglable widgets in custom-toggle-hide-all-variables
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 11 May 2022 11:42:02 +0000 (13:42 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 11 May 2022 11:42:02 +0000 (13:42 +0200)
* lisp/cus-edit.el (custom-toggle-hide-all-variables): Only toggle
the widgets that can be toggled.

lisp/cus-edit.el

index 0870bf6782fc8b16ceeb23f7a98a2f4c86ffca2a..f2202563456ce32b86c31906019f1756604e12af 100644 (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)