]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix dired default file operation (bug#41261)
authorLeo Vivier <leo.vivier+dev@gmail.com>
Thu, 14 May 2020 22:03:18 +0000 (00:03 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 15 May 2020 07:18:27 +0000 (10:18 +0300)
* lisp/dired-aux.el (dired-dwim-target-directories): Restore
pre-emacs-27 behavior of 'dired-dwim-target'.

lisp/dired-aux.el

index 0069c1744dcc562f608f74d6693d4b5b8e7acad6..7f988540c2c60145fa4ba6d23dbd52daf9b030e0 100644 (file)
@@ -2002,10 +2002,9 @@ Optional arg HOW-TO determines how to treat the target.
    (format prompt (dired-mark-prompt arg files)) dir default))
 
 (defun dired-dwim-target-directories ()
-  (cond ((functionp dired-dwim-target)
-         (funcall dired-dwim-target))
-        (dired-dwim-target
-         (dired-dwim-target-next))))
+  (if (functionp dired-dwim-target)
+      (funcall dired-dwim-target)
+    (dired-dwim-target-next)))
 
 (defun dired-dwim-target-next (&optional all-frames)
   ;; Return directories from all next windows with dired-mode buffers.