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)
This commit is contained in:
parent
0f3d4e157f
commit
d4ca688abe
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue