mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-03 11:33:37 +00:00
Fix :match function for the file widget
* lisp/wid-edit.el (file widget): Return nil if value is not a string (bug#25678).
This commit is contained in:
parent
5d522b430b
commit
c033bb8648
@ -3162,8 +3162,9 @@ It reads a file name from an editable text field."
|
||||
#'completion-file-name-table
|
||||
(not read-file-name-completion-ignore-case))
|
||||
:match (lambda (widget value)
|
||||
(or (not (widget-get widget :must-match))
|
||||
(file-exists-p value)))
|
||||
(and (stringp value)
|
||||
(or (not (widget-get widget :must-match))
|
||||
(file-exists-p value))))
|
||||
:validate (lambda (widget)
|
||||
(let ((value (widget-value widget)))
|
||||
(unless (widget-apply widget :match value)
|
||||
|
Loading…
Reference in New Issue
Block a user