* lisp/vc/vc-dispatcher.el (vc-run-delayed): New macro.
[bpt/emacs.git] / lisp / vc / vc-bzr.el
index 0d95fbe..5f5416d 100644 (file)
@@ -47,6 +47,7 @@
 
 (eval-when-compile
   (require 'cl-lib)
+  (require 'vc-dispatcher)
   (require 'vc-dir))                    ; vc-dir-at-event
 
 ;; Clear up the cache to force vc-call to check again and discover
@@ -354,7 +355,7 @@ prompt for the Bzr command to run."
            command        (cadr args)
            args           (cddr args)))
     (let ((buf (apply 'vc-bzr-async-command command args)))
-      (with-current-buffer buf (vc-exec-after '(vc-compilation-mode 'bzr)))
+      (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
       (vc-set-async-update buf))))
 
 (defun vc-bzr-merge-branch ()
@@ -385,7 +386,7 @@ default if it is available."
         (command        (cadr cmd))
         (args           (cddr cmd)))
     (let ((buf (apply 'vc-bzr-async-command command args)))
-      (with-current-buffer buf (vc-exec-after '(vc-compilation-mode 'bzr)))
+      (with-current-buffer buf (vc-run-delayed (vc-compilation-mode 'bzr)))
       (vc-set-async-update buf))))
 
 (defun vc-bzr-status (file)
@@ -995,23 +996,23 @@ stream.  Standard error output is discarded."
 (defun vc-bzr-dir-status (dir update-function)
   "Return a list of conses (file . state) for DIR."
   (vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S")
-  (vc-exec-after
-   `(vc-bzr-after-dir-status (quote ,update-function)
-                            ;; "bzr status" results are relative to
-                            ;; the bzr root directory, NOT to the
-                            ;; directory "bzr status" was invoked in.
-                            ;; Ugh.
-                            ;; We pass the relative directory here so
-                            ;; that `vc-bzr-after-dir-status' can
-                            ;; frob the results accordingly.
-                            (file-relative-name ,dir (vc-bzr-root ,dir)))))
+  (vc-run-delayed
+   (vc-bzr-after-dir-status update-function
+                            ;; "bzr status" results are relative to
+                            ;; the bzr root directory, NOT to the
+                            ;; directory "bzr status" was invoked in.
+                            ;; Ugh.
+                            ;; We pass the relative directory here so
+                            ;; that `vc-bzr-after-dir-status' can
+                            ;; frob the results accordingly.
+                            (file-relative-name dir (vc-bzr-root dir)))))
 
 (defun vc-bzr-dir-status-files (dir files _default-state update-function)
   "Return a list of conses (file . state) for DIR."
   (apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
-  (vc-exec-after
-   `(vc-bzr-after-dir-status (quote ,update-function)
-                            (file-relative-name ,dir (vc-bzr-root ,dir)))))
+  (vc-run-delayed
+   (vc-bzr-after-dir-status update-function
+                            (file-relative-name dir (vc-bzr-root dir)))))
 
 (defvar vc-bzr-shelve-map
   (let ((map (make-sparse-keymap)))