Merge from emacs-24; up to 2014-04-25T10:35:01Z!michael.albinus@gmx.de
[bpt/emacs.git] / lisp / url / url-future.el
index 38ac09c..0505218 100644 (file)
@@ -1,6 +1,6 @@
 ;;; url-future.el --- general futures facility for url.el
 
-;; Copyright (C) 2011-201 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2014 Free Software Foundation, Inc.
 
 ;; Author: Teodor Zlatanov <tzz@lifelogs.com>
 ;; Keywords: data
 ;; So, to get the value:
 ;; (when (url-future-completed-p future) (url-future-value future))
 
-;; See the ERT tests and the code for further details.
+;; See `url-future-tests' and the code below for further details.
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
 
-(defstruct url-future callback errorback status value)
+(cl-defstruct url-future callback errorback status value)
 
 (defmacro url-future-done-p (url-future)
   `(url-future-status ,url-future))
@@ -84,7 +84,9 @@
             (setf (url-future-value url-future)
                   (funcall ff))
           (error (url-future-errored url-future catcher)))
-        (url-future-value url-future)))
+        ;; Unused return value.
+;;;        (url-future-value url-future)
+        ))
     (if (url-future-errored-p url-future)
         url-future
       (url-future-finish url-future))))