From d35b443a668c135c6cf5fbbd2417553c0f4ab9b8 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 18 Jun 2014 10:57:27 +0300 Subject: [PATCH] * lisp/dired.el (dired-mark-pop-up): Let-bind display-buffer-mark-dedicated to `soft'. Fixes: debbugs:17554 --- lisp/ChangeLog | 5 +++++ lisp/dired.el | 5 ++++- lisp/window.el | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2daf277166f..de2a8bd085b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-06-18 Juri Linkov + + * dired.el (dired-mark-pop-up): Let-bind display-buffer-mark-dedicated + to `soft'. (Bug#17554) + 2014-06-17 Stefan Monnier * delsel.el (electric-newline-and-maybe-indent): Mark it as well diff --git a/lisp/dired.el b/lisp/dired.el index 07fe6fe7d14..e4f297e8cc8 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3099,7 +3099,10 @@ argument or confirmation)." ;; If FILES defaulted to the current line's file. (= (length files) 1)) (apply function args) - (let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*")))) + (let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*"))) + ;; Mark *Marked Files* window as softly-dedicated, to prevent + ;; other buffers e.g. *Completions* from reusing it (bug#17554). + (display-buffer-mark-dedicated 'soft)) (with-current-buffer buffer (with-current-buffer-window buffer diff --git a/lisp/window.el b/lisp/window.el index e9f4fd0b1d2..28dd6a8ab26 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5966,7 +5966,7 @@ live." ;; FIXME: By the way, there could be more levels of dedication: ;; - `barely' dedicated doesn't prevent reuse of the window, only records that ;; the window hasn't been used for something else yet. -;; - `softly' dedicated only allows reuse when asked explicitly. +;; - `soft' (`softly') dedicated only allows reuse when asked explicitly. ;; - `strongly' never allows reuse. (defvar display-buffer-mark-dedicated nil "If non-nil, `display-buffer' marks the windows it creates as dedicated. -- 2.39.5