]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix repetition in callback.
authorThierry Volpiatto <thierry.volpiatto@gmail.com>
Fri, 29 Apr 2016 15:03:30 +0000 (17:03 +0200)
committerThierry Volpiatto <thierry.volpiatto@gmail.com>
Fri, 29 Apr 2016 15:04:43 +0000 (17:04 +0200)
* dired-async.el (dired-async-create-files): Do it.

dired-async.el

index 418f265e943bd7b9811070cfcb460539f67c3a70..4920e78824a0b01cbc0fc738ec887e9ca6c8abcf 100644 (file)
@@ -213,9 +213,9 @@ ESC or `q' to not overwrite any of the remaining files,
                (dired-async-after-file-create ,total)
                (when (string= ,(downcase operation) "rename")
                  (cl-loop for (file . to) in ',async-fn-list
-                          do (and (get-file-buffer file)
-                                  (with-current-buffer (get-file-buffer file)
-                                    (set-visited-file-name to nil t))))))))
+                          for bf = (get-file-buffer file)
+                          do (and bf (with-current-buffer bf
+                                       (set-visited-file-name to nil t))))))))
     ;; Handle error happening in host emacs.
     (cond (failures
            (dired-log-summary