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
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue