[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/async 373b32a 55/60: Remove props recursively when inje
From: |
Stefan Monnier |
Subject: |
[elpa] externals/async 373b32a 55/60: Remove props recursively when injecting vars with NOPROPS |
Date: |
Tue, 8 Oct 2019 10:11:36 -0400 (EDT) |
branch: externals/async
commit 373b32a058604826afb2ca38e3f5480e512c87ab
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>
Remove props recursively when injecting vars with NOPROPS
* async.el (async-variables-noprops-function): Update to new name.
(async--purecopy): Renamed from async-variables-noprops, now recursive.
---
async.el | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/async.el b/async.el
index 771e641..cf46c38 100644
--- a/async.el
+++ b/async.el
@@ -37,7 +37,7 @@
"Simple asynchronous processing in Emacs"
:group 'emacs)
-(defcustom async-variables-noprops-function #'async-variables-noprops
+(defcustom async-variables-noprops-function #'async--purecopy
"Default function to remove text properties in variables."
:group 'async
:type 'function)
@@ -52,23 +52,23 @@
(defvar async-current-process nil)
(defvar async--procvar nil)
-(defun async-variables-noprops (sequence)
- "Remove text properties in SEQUENCE.
+(defun async--purecopy (object)
+ "Remove text properties in OBJECT.
-Argument SEQUENCE may be a list or a string, if anything else it
-is returned unmodified.
-
-Note that this is a naive function that doesn't remove text properties
-in SEQUENCE recursively, only at the first level which suffice in most
-cases."
- (cond ((stringp sequence)
- (substring-no-properties sequence))
- ((listp sequence)
- (cl-loop for elm in sequence
+Argument OBJECT may be a list or a string, if anything else it
+is returned unmodified."
+ (cond ((stringp object)
+ (substring-no-properties object))
+ ((listp object)
+ (cl-loop for elm in object
if (stringp elm)
collect (substring-no-properties elm)
- else collect elm))
- (t sequence)))
+ else
+ if (and (listp elm) (null (cdr (last elm))))
+ collect (async--purecopy elm)
+ else
+ collect elm))
+ (t object)))
(defun async-inject-variables
(include-regexp &optional predicate exclude-regexp noprops)
- [elpa] externals/async c3b297f 27/60: Merge pull request #83 from darkfeline/lighter, (continued)
- [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, 2019/10/08
- [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 <=
- [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
- [elpa] externals/async e5e636c 19/60: Update version number., Stefan Monnier, 2019/10/08
- [elpa] externals/async ea83ef5 23/60: Use emacs -q flag to fix issue #80 with emacs-26, Stefan Monnier, 2019/10/08
- [elpa] externals/async 87853ae 29/60: Allow backing up in same directory, Stefan Monnier, 2019/10/08