[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 3f2f695e79 2/5: Prevent possible error setting-consta
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 3f2f695e79 2/5: Prevent possible error setting-constant (nil) |
Date: |
Thu, 4 Jul 2024 10:00:20 -0400 (EDT) |
branch: elpa/helm
commit 3f2f695e79bcbb9de336d2e97f236b39eb6c3046
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Prevent possible error setting-constant (nil)
---
helm-core.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/helm-core.el b/helm-core.el
index 76aef3c67a..964fa17f53 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -4361,12 +4361,13 @@ Cache the candidates if there is no cached value yet."
(let ((real (if (consp ,candidate)
(cdr ,candidate)
,candidate)))
- (if (and (listp it)
- (not (functionp it))) ;; Don't treat lambda's as list.
- (cl-loop for f in it
- do (setq ,candidate (funcall f real))
- finally return ,candidate)
- (setq ,candidate (funcall it real))))
+ (when real
+ (if (and (listp it)
+ (not (functionp it))) ;; Don't treat lambda's as list.
+ (cl-loop for f in it
+ do (setq ,candidate (funcall f real))
+ finally return ,candidate)
+ (setq ,candidate (funcall it real)))))
,candidate))
(defun helm--initialize-one-by-one-candidates (candidates source)