[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/async b13baeb 47/60: Fix two issues in async-inject-var
From: |
Stefan Monnier |
Subject: |
[elpa] externals/async b13baeb 47/60: Fix two issues in async-inject-variables |
Date: |
Tue, 8 Oct 2019 10:11:35 -0400 (EDT) |
branch: externals/async
commit b13baeb996551aed1e257475913b395eb0e56d40
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>
Fix two issues in async-inject-variables
1) Avoid insertion of syntax-tables when EXCLUDE-REGEXP argument is
specified.
2) Don't quote strings, nil, t and vectors.
* async.el (async-inject-variables): Do it.
---
async.el | 35 ++++++++++++++++++++---------------
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git a/async.el b/async.el
index 7d6f60a..1575a35 100644
--- a/async.el
+++ b/async.el
@@ -76,7 +76,8 @@ cases."
It sets the value for every variable matching INCLUDE-REGEXP and
also PREDICATE. It will not perform injection for any variable
-matching EXCLUDE-REGEXP (if present).
+matching EXCLUDE-REGEXP (if present) or representing a syntax-table
+i.e. ending by \"-syntax-table\".
When NOPROPS is non nil it tries to strip out text properties of each
variable's value with `async-variables-noprops-function'.
@@ -95,20 +96,24 @@ It is intended to be used as follows:
,@(let (bindings)
(mapatoms
(lambda (sym)
- (if (and (boundp sym)
- (or (null include-regexp)
- (string-match include-regexp (symbol-name sym)))
- (not (string-match
- (or exclude-regexp "-syntax-table\\'")
- (symbol-name sym))))
- (let ((value (symbol-value sym)))
- (when noprops
- (setq value (funcall async-variables-noprops-function
- value)))
- (when (or (null predicate)
- (funcall predicate sym))
- (setq bindings (cons `(quote ,value) bindings)
- bindings (cons sym bindings)))))))
+ (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)))
+ (unless (or (stringp value)
+ (memq value '(nil t))
+ (vectorp value))
+ (setq value `(quote ,value)))
+ (when noprops
+ (setq value (funcall async-variables-noprops-function
+ value)))
+ (when (or (null predicate)
+ (funcall predicate sym))
+ (setq bindings (cons value bindings)
+ bindings (cons sym bindings)))))))
bindings)))
(defalias 'async-inject-environment 'async-inject-variables)
- [elpa] externals/async e1a3735 20/60: Merge branch 'master' of github.com:jwiegley/emacs-async, (continued)
- [elpa] externals/async e1a3735 20/60: Merge branch 'master' of github.com:jwiegley/emacs-async, Stefan Monnier, 2019/10/08
- [elpa] externals/async d6222c2 22/60: Ensure wdired-use-interactive-rename is disabled., Stefan Monnier, 2019/10/08
- [elpa] externals/async d422df5 24/60: Add new var to allow calling emacs with -Q or -q (#80)., Stefan Monnier, 2019/10/08
- [elpa] externals/async c3b297f 27/60: Merge pull request #83 from darkfeline/lighter, Stefan Monnier, 2019/10/08
- [elpa] externals/async 4e894a2 16/60: Update README., Stefan Monnier, 2019/10/08
- [elpa] externals/async 324549b 36/60: Merge pull request #94 from astahlman/auto-select-coding, Stefan Monnier, 2019/10/08
- [elpa] externals/async d13c0bc 35/60: Choose coding system based on environment, Stefan Monnier, 2019/10/08
- [elpa] externals/async 890b38f 18/60: Add makefile., Stefan Monnier, 2019/10/08
- [elpa] externals/async afd1ad5 39/60: Allow removing text properties in strings when injecting, Stefan Monnier, 2019/10/08
- [elpa] externals/async 0a56cae 50/60: Update README, Stefan Monnier, 2019/10/08
- [elpa] externals/async b13baeb 47/60: Fix two issues in async-inject-variables,
Stefan Monnier <=
- [elpa] externals/async 6fa6a86 49/60: Don't quote numbers as well, Stefan Monnier, 2019/10/08
- [elpa] externals/async caad15c 42/60: Bump to 1.9.3, Stefan Monnier, 2019/10/08
- [elpa] externals/async 373b32a 55/60: Remove props recursively when injecting vars with NOPROPS, Stefan Monnier, 2019/10/08
- [elpa] externals/async 81dc034 54/60: Merge pull request #107 from CeleritasCelery/master, Stefan Monnier, 2019/10/08
- [elpa] externals/async f61f1db 60/60: Merge pull request #113 from jwiegley/smonnier_patch, Stefan Monnier, 2019/10/08
- [elpa] externals/async 5e353eb 59/60: Change deps management in async-bytecomp.el, Stefan Monnier, 2019/10/08
- [elpa] externals/async 29e6144 07/60: Allow non list bindings in async-let., Stefan Monnier, 2019/10/08
- [elpa] externals/async d17c11e 51/60: Add more info about emacs bug when using async, Stefan Monnier, 2019/10/08
- [elpa] externals/async 7df4b68 40/60: Merge branch 'master' of github.com:jwiegley/emacs-async, Stefan Monnier, 2019/10/08
- [elpa] externals/async 6c9c3a2 17/60: Update README.md, Stefan Monnier, 2019/10/08