From: Lars Ingebrigtsen Date: Tue, 25 May 2021 19:29:24 +0000 (+0200) Subject: Restore `dired-do-create-files' return value X-Git-Tag: emacs-28.0.90~2335^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fcb3990b8dfb564110c11295a0a7555f90f4fde9;p=emacs.git Restore `dired-do-create-files' return value * lisp/dired-aux.el (dired-do-create-files): Preserve the return value from `dired-create-files', which is apparently an undocumented feature used by dired-aux-tests.el (dired-test-bug30624). --- diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 0ac4e54bafe..a1dda3f5a20 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2179,20 +2179,21 @@ Optional arg HOW-TO determines how to treat the target. (error "%s: Target directory does not exist: %s" operation target)) ;; rename-file bombs when moving directories unless we do this: (or into-dir (setq target (directory-file-name target))) - (dired-create-files - file-creator operation fn-list - (if into-dir ; target is a directory - ;; This function uses fluid variable target when called - ;; inside dired-create-files: - (lambda (from) - (expand-file-name (file-name-nondirectory from) target)) - (lambda (_from) target)) - marker-char) - (when (or (eq dired-do-revert-buffer t) - (and (functionp dired-do-revert-buffer) - (funcall dired-do-revert-buffer target))) - (dired-fun-in-all-buffers (file-name-directory target) nil - #'revert-buffer))))) + (prog1 + (dired-create-files + file-creator operation fn-list + (if into-dir ; target is a directory + ;; This function uses fluid variable target when called + ;; inside dired-create-files: + (lambda (from) + (expand-file-name (file-name-nondirectory from) target)) + (lambda (_from) target)) + marker-char) + (when (or (eq dired-do-revert-buffer t) + (and (functionp dired-do-revert-buffer) + (funcall dired-do-revert-buffer target))) + (dired-fun-in-all-buffers (file-name-directory target) nil + #'revert-buffer)))))) ;; Read arguments for a marked-files command that wants a file name, ;; perhaps popping up the list of marked files.