X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/423a6b218804a210486fdb06af44bcc700b1bca4..f10533854f4c7bb54247a11981191bf37b70cb36:/packages/async/async.el diff --git a/packages/async/async.el b/packages/async/async.el index 24db2a1e7..6619fffee 100644 --- a/packages/async/async.el +++ b/packages/async/async.el @@ -1,10 +1,10 @@ -;;; async.el --- Asynchronous processing in Emacs +;;; async.el --- Asynchronous processing in Emacs -*- lexical-binding: t -*- ;; Copyright (C) 2012-2016 Free Software Foundation, Inc. ;; Author: John Wiegley ;; Created: 18 Jun 2012 -;; Version: 1.6 +;; Version: 1.9 ;; Keywords: async ;; X-URL: https://github.com/jwiegley/emacs-async @@ -54,14 +54,14 @@ matching EXCLUDE-REGEXP (if present). It is intended to be used as follows: (async-start - `(lambda () - (require 'smtpmail) + \\=`(lambda () + (require \\='smtpmail) (with-temp-buffer (insert ,(buffer-substring-no-properties (point-min) (point-max))) ;; Pass in the variable environment for smtpmail - ,(async-inject-variables \"\\`\\(smtpmail\\|\\(user-\\)?mail\\)-\") + ,(async-inject-variables \"\\\\=`\\(smtpmail\\|\\(user-\\)?mail\\)-\") (smtpmail-send-it))) - 'ignore)" + \\='ignore)" `(setq ,@(let (bindings) (mapatoms @@ -95,8 +95,8 @@ as follows: (unless async-debug (kill-buffer buf))))) -(defun async-when-done (proc &optional change) - "Process sentinal used to retrieve the value from the child process." +(defun async-when-done (proc &optional _change) + "Process sentinel used to retrieve the value from the child process." (when (eq 'exit (process-status proc)) (with-current-buffer (process-buffer proc) (let ((async-current-process proc)) @@ -201,7 +201,7 @@ its FINISH-FUNC is nil." (funcall async-callback args)) (async--transmit-sexp (car args) (list 'quote (cdr args)))))) -(defun async-receive (&rest args) +(defun async-receive () "Send the given messages to the asychronous Emacs PROCESS." (async--receive-sexp)) @@ -257,14 +257,14 @@ ready. Example: (async-get proc))) If you don't want to use a callback, and you don't care about any -return value form the child process, pass the `ignore' symbol as +return value from the child process, pass the `ignore' symbol as the second argument (if you don't, and never call `async-get', it will leave *emacs* process buffers hanging around): (async-start (lambda () (delete-file \"a remote file on a slow link\" nil)) - 'ignore) + \\='ignore) Note: Even when FINISH-FUNC is present, a future is still returned except that it yields no value (since the value is