- `(lambda (&optional ignore)
- (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))))))))
- ;; Handle error happening in host emacs.
- (cond (failures
- (dired-log-summary
- (format "%s failed for %d of %d file%s"
- operation (length failures)
- total (dired-plural-s total))
- failures))
- (skipped
- (dired-log-summary
- (format "%s: %d of %d file%s skipped"
- operation (length skipped) total
- (dired-plural-s total))
- skipped)))
+ (lambda (&optional _ignore)
+ (dired-async-after-file-create
+ total (list operation (length async-fn-list)) failures skipped)
+ (when (string= (downcase operation) "rename")
+ (cl-loop for (file . to) in async-fn-list
+ for bf = (get-file-buffer file)
+ do (and bf (with-current-buffer bf
+ (set-visited-file-name to nil t))))))))