[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master c033bb8: Fix :match function for the file widget
From: |
Lars Ingebrigtsen |
Subject: |
master c033bb8: Fix :match function for the file widget |
Date: |
Thu, 10 Sep 2020 09:12:59 -0400 (EDT) |
branch: master
commit c033bb8648dc6fc14c96925710d662dbcd214cc7
Author: Mauro Aranda <maurooaranda@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix :match function for the file widget
* lisp/wid-edit.el (file widget): Return nil if value is not a
string (bug#25678).
---
lisp/wid-edit.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index e9799dc..bc2afc6 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master c033bb8: Fix :match function for the file widget,
Lars Ingebrigtsen <=