emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/async c9bd058 48/60: DRY in async-inject-variables


From: Stefan Monnier
Subject: [elpa] externals/async c9bd058 48/60: DRY in async-inject-variables
Date: Tue, 8 Oct 2019 10:11:35 -0400 (EDT)

branch: externals/async
commit c9bd058b7d42391a06e3d8ffa2357474cd671356
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>

    DRY in async-inject-variables
    
    * async.el (async-inject-variables): Do it.
---
 async.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/async.el b/async.el
index 1575a35..020e424 100644
--- a/async.el
+++ b/async.el
@@ -96,13 +96,14 @@ It is intended to be used as follows:
     ,@(let (bindings)
         (mapatoms
          (lambda (sym)
-           (when (and (boundp sym)
-                      (or (null include-regexp)
-                          (string-match include-regexp (symbol-name sym)))
-                      (or (null exclude-regexp)
-                          (not (string-match exclude-regexp (symbol-name 
sym))))
-                      (not (string-match "-syntax-table\\'" (symbol-name 
sym))))
-             (let ((value (symbol-value sym)))
+           (let* ((sname (and (boundp sym) (symbol-name sym)))
+                  (value (and sname (symbol-value sym))))
+             (when (and sname
+                        (or (null include-regexp)
+                            (string-match include-regexp sname))
+                        (or (null exclude-regexp)
+                            (not (string-match exclude-regexp sname)))
+                        (not (string-match "-syntax-table\\'" sname)))
                (unless (or (stringp value)
                            (memq value '(nil t))
                            (vectorp value))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]