diff options
author | Mauro Aranda <maurooaranda@gmail.com> | 2025-01-20 21:16:48 -0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2025-01-25 12:14:44 +0200 |
commit | d4ca688abefa90cf3e54add036b32c06b7da6363 (patch) | |
tree | b01cf5de7a0fc1b392a910e488eb72c10243ef50 /lisp/cus-edit.el | |
parent | 0f3d4e157fb9e638f568128096c818d4485b60fa (diff) | |
download | emacs-d4ca688abefa90cf3e54add036b32c06b7da6363.tar.gz emacs-d4ca688abefa90cf3e54add036b32c06b7da6363.tar.bz2 emacs-d4ca688abefa90cf3e54add036b32c06b7da6363.zip |
Avoid error with empty search string in Customize
* lisp/cus-edit.el (custom-buffer-create-internal): Only call
customize-apropos if the string is not empty. (Bug#75714)
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r-- | lisp/cus-edit.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 95dd4c9e354..febbc8d1b8b 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1774,14 +1774,17 @@ or a regular expression.") 'editable-field :size 40 :help-echo echo :action (lambda (widget &optional _event) - (customize-apropos (split-string (widget-value widget))))))) + (let ((value (widget-value widget))) + (if (string= value "") + (message "Empty search field") + (customize-apropos (split-string value)))))))) (widget-insert " ") (widget-create-child-and-convert search-widget 'push-button :tag " Search " :help-echo echo :action (lambda (widget &optional _event) - (customize-apropos (split-string (widget-value (widget-get widget :parent)))))) + (widget-apply (widget-get widget :parent) :action))) (widget-insert "\n"))) ;; The custom command buttons are also in the toolbar, so for a |