From dcbe8267834dca80e94d4f96d61e76517e8c0022 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 12 May 2022 02:27:22 +0200 Subject: [PATCH] Fix non-variable widgets in the 'H' command in Cus-mode * lisp/cus-edit.el (custom-mode-map): (custom-commands): Adjust. (custom-toggle-hide-all-widgets): Rename and work for all widget types, not just variables. --- etc/NEWS | 2 +- lisp/cus-edit.el | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 7037f1ebeb6..5e4e2e98ecf 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -799,7 +799,7 @@ the run/continue command. ** Customize --- -*** New command 'custom-toggle-hide-all-variables'. +*** New command 'custom-toggle-hide-all-widgets'. This is bound to 'H' and toggles whether to hide or show the widget contents. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index a7d06d5e421..df4edb78a1b 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -441,7 +441,7 @@ Use group `text' for this instead. This group is deprecated." (define-key map "u" 'Custom-goto-parent) (define-key map "n" 'widget-forward) (define-key map "p" 'widget-backward) - (define-key map "H" 'custom-toggle-hide-all-variables) + (define-key map "H" 'custom-toggle-hide-all-widgets) map) "Keymap for `Custom-mode'.") @@ -746,7 +746,7 @@ groups after non-groups, if nil do not order groups at all." (or custom-file user-init-file) "Un-customize settings in this and future sessions." "delete" "Uncustomize" (modified set changed rogue saved)) - (" Toggle hiding all values " custom-toggle-hide-all-variables + (" Toggle hiding all values " custom-toggle-hide-all-widgets t "Toggle hiding all values." "hide" "Hide" t) (" Help for Customize " Custom-help t "Get help for using Customize." @@ -2840,7 +2840,7 @@ try matching its doc string against `custom-guess-doc-alist'." (defvar custom--hidden-state) -(defun custom-toggle-hide-all-variables () +(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*\". @@ -2862,7 +2862,7 @@ else." (setq state 'standard)) (when (and (eq (widget-type widget) 'custom-visibility) (eq state custom--hidden-state)) - (custom-toggle-hide-variable widget))) + (custom-toggle-parent widget))) (forward-line 1))) (setq custom--hidden-state (if (eq custom--hidden-state 'hidden) 'standard -- 2.39.2