;;; async --- Asynchronous processing in Emacs
-;; Copyright (C) 2012~2013 John Wiegley
+;; Copyright (C) 2012~2014 John Wiegley
;; Author: John Wiegley <jwiegley@gmail.com>
;; Created: 18 Jun 2012
-;; Version: 1.1
+
;; Keywords: async
;; X-URL: https://github.com/jwiegley/emacs-async
returns nil. It can still be useful, however, as an argument to
`async-ready' or `async-wait'."
(require 'find-func)
- (let ((procvar (make-symbol "proc"))
- ;; Avoid accidental lexical closures by evaluating START-FUNC
- ;; in an empty lexical environment.
- (start-func (eval start-func t)))
- `(let* ((sexp #',start-func)
+ (let ((procvar (make-symbol "proc")))
+ `(let* ((sexp ,start-func)
(,procvar
(async-start-process
"emacs" (file-truename
(expand-file-name invocation-name
invocation-directory))
,finish-func
- "-Q" "-l" ,(funcall (symbol-function 'find-library-name)
- "async")
+ "-Q" "-l"
+ ;; Using `locate-library' ensure we use the right file
+ ;; when the .elc have been deleted.
+ ,(locate-library "async")
"-batch" "-f" "async-batch-invoke"
(if async-send-over-pipe
"<none>"