From 4ae73f87a0f3ab6f9b7cdca19a3df40d945fc7a9 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sat, 1 May 2004 05:38:07 +0000 Subject: [PATCH] (dired-diff): Use `dired-dwim-target-directory' if current dired buffer has no buffer mark. --- lisp/ChangeLog | 2 ++ lisp/dired-aux.el | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eecf77f488b..4b61e5ceabb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -14,6 +14,8 @@ * dired-aux.el (dired-touch-initial): New fun. (dired-do-chxxx): Call it for op-symbol `touch'. + (dired-diff): Use `dired-dwim-target-directory' + if current dired buffer has no buffer mark. * bindings.el (propertized-buffer-identification): Replace `(:weight bold)' by `Buffer-menu-buffer-face'. diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index dbc3d763040..b31d20782f3 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -64,7 +64,10 @@ With prefix arg, prompt for second argument SWITCHES, (if default (concat "(default " default ") ") "")) - (dired-current-directory) default t) + (if default + (dired-current-directory) + (dired-dwim-target-directory)) + default t) (if current-prefix-arg (read-string "Options for diff: " (if (stringp diff-switches) -- 2.39.5