"Simple asynchronous processing in Emacs"
:group 'emacs)
-(defvar async-callback)
+(defvar async-callback nil)
(defvar async-callback-value nil)
(defvar async-callback-value-set nil)
(require 'smtpmail)
(defun async-smtpmail-send-it ()
- (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))
+ (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)))
(provide 'smtpmail-async)