]> code.delx.au - gnu-emacs-elpa/blobdiff - dired-async.el
Fix repetition in callback.
[gnu-emacs-elpa] / 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