[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/validate 3287503 1/3: Fix case when const uses :value -
From: |
Stefan Monnier |
Subject: |
[elpa] externals/validate 3287503 1/3: Fix case when const uses :value - Fix #7 |
Date: |
Tue, 16 Mar 2021 00:01:34 -0400 (EDT) |
branch: externals/validate
commit 3287503edfd76e1cd21c0ddada54f610901ed010
Author: Artur Malabarba <artur@endlessparentheses.com>
Commit: Artur Malabarba <artur@endlessparentheses.com>
Fix case when const uses :value - Fix #7
---
validate.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/validate.el b/validate.el
index a51cd81..eb78567 100644
--- a/validate.el
+++ b/validate.el
@@ -97,8 +97,9 @@ If they don't match, return an explanation."
((wtype 'list))
(t (let ((subschema (car args)))
(seq-some (lambda (v) (validate--check v
subschema)) value)))))
- ((const function-item variable-item) (unless (equal value (car
args))
- "not the expected
value"))
+ ((const function-item variable-item)
+ (unless (equal value (or (plist-get props :value) (car args)))
+ "not the expected value"))
(file (cond ((wtype 'string))
((file-exists-p value) nil)
((plist-get props :must-match) "file does not
exist")