[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 190a040 012/187: Fixed async-smtpmail-send-it
From: |
Michael Albinus |
Subject: |
[elpa] master 190a040 012/187: Fixed async-smtpmail-send-it |
Date: |
Wed, 30 Dec 2015 11:49:24 +0000 |
branch: master
commit 190a0406536ca975347252da2646d7d889f60ef8
Author: John Wiegley <address@hidden>
Commit: John Wiegley <address@hidden>
Fixed async-smtpmail-send-it
---
async.el | 41 ++++++++++++++++++++---------------------
smtpmail-async.el | 19 +++++++++----------
2 files changed, 29 insertions(+), 31 deletions(-)
diff --git a/async.el b/async.el
index 2c6707b..e5f5f6a 100644
--- a/async.el
+++ b/async.el
@@ -75,27 +75,26 @@
(defmacro async-inject-environment
(include-regexp &optional predicate exclude-regexp)
"Inject a part of the parent environment into an async function."
- `(setq
- ,@(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 (or (null predicate)
- (funcall (or predicate
- (lambda (sym)
- (let ((value (symbol-value sym)))
- (or (not (functionp value))
- (symbolp value))))) sym))
- (setq bindings (cons `(quote ,value)
- bindings))
- (setq bindings (cons sym bindings)))))))
- bindings)))
+ `'(setq
+ ,@(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 (funcall (or predicate
+ (lambda (sym)
+ (let ((value (symbol-value sym)))
+ (or (not (functionp value))
+ (symbolp value)))))
+ sym)
+ (setq bindings (cons `(quote ,value) bindings)
+ bindings (cons sym bindings)))))))
+ bindings)))
(defun async-when-done (proc &optional change)
"Process sentinal used to retrieve the value from the child process."
diff --git a/smtpmail-async.el b/smtpmail-async.el
index 71f03e4..42fb6d7 100644
--- a/smtpmail-async.el
+++ b/smtpmail-async.el
@@ -42,16 +42,15 @@
(require 'smtpmail)
(defun async-smtpmail-send-it ()
- (macroexpand
- '(async-start
- `(lambda ()
- (require 'smtpmail)
- (with-temp-buffer
- (insert ,(buffer-substring-no-properties (point-min) (point-max)))
- ;; Pass in the variable environment for smtpmail
- (async-inject-environment "\\`\\(smtpmail\\|\\(user-\\)?mail\\)-")
- (smtpmail-send-it)))
- 'ignore)))
+ (async-start
+ `(lambda ()
+ (require 'smtpmail)
+ (with-temp-buffer
+ (insert ,(buffer-substring-no-properties (point-min) (point-max)))
+ ;; Pass in the variable environment for smtpmail
+ ,(async-inject-environment "\\`\\(smtpmail\\|\\(user-\\)?mail\\)-")
+ (smtpmail-send-it)))
+ 'ignore))
(provide 'smtpmail-async)
- [elpa] master 8d37c00 004/187: Added note to README, (continued)
- [elpa] master 8d37c00 004/187: Added note to README, Michael Albinus, 2015/12/30
- [elpa] master 4733d1e 001/187: Initial revision, Michael Albinus, 2015/12/30
- [elpa] master 3d388c6 007/187: Added support for signal propagation, Michael Albinus, 2015/12/30
- [elpa] master 0a7f3dd 008/187: Added async-inject-environment, Michael Albinus, 2015/12/30
- [elpa] master 954c865 006/187: Updated README, Michael Albinus, 2015/12/30
- [elpa] master a8ac820 003/187: Renamed emacs-async.el to async.el, Michael Albinus, 2015/12/30
- [elpa] master 63fe7ee 010/187: Updated README, Michael Albinus, 2015/12/30
- [elpa] master c48d3db 009/187: Added smtpmail-async.el, Michael Albinus, 2015/12/30
- [elpa] master 728e791 005/187: Added dired-async, Michael Albinus, 2015/12/30
- [elpa] master 628a295 014/187: Send data over a pipe, rather than in an argument, Michael Albinus, 2015/12/30
- [elpa] master 190a040 012/187: Fixed async-smtpmail-send-it,
Michael Albinus <=
- [elpa] master 4fb51ce 013/187: Corrected a problem with async deletions, Michael Albinus, 2015/12/30
- [elpa] master 1ad2902 011/187: Quiet byte-compiler warnings, Michael Albinus, 2015/12/30
- [elpa] master 742c82e 020/187: Added message passing, but undocumented for now, Michael Albinus, 2015/12/30
- [elpa] master b80f1a5 018/187: Don't use pipes for communication just yet, Michael Albinus, 2015/12/30
- [elpa] master 497e4da 024/187: Fix to dired-async for wdired-mode, Michael Albinus, 2015/12/30
- [elpa] master e08c251 017/187: Added `dired-async-use-native-commands', Michael Albinus, 2015/12/30
- [elpa] master 7ba4f40 022/187: Always base64 encode, Michael Albinus, 2015/12/30
- [elpa] master 1028235 023/187: Don't use lexical-binding in dired-async.el, Michael Albinus, 2015/12/30
- [elpa] master 12ca991 016/187: Made some macros into functions, added debug code, Michael Albinus, 2015/12/30
- [elpa] master 386a876 019/187: Some minor adjustments, Michael Albinus, 2015/12/30