]> code.delx.au - gnu-emacs/blobdiff - lisp/dired.el
Update copyright year to 2015
[gnu-emacs] / lisp / dired.el
index fc90b7a98e0af54124adf825972040d3fa8a45c3..003a95a4d9df479a411643f693045528dace2c4b 100644 (file)
@@ -1,7 +1,7 @@
 ;;; dired.el --- directory-browsing commands -*- lexical-binding: t -*-
 
-;; Copyright (C) 1985-1986, 1992-1997, 2000-2014
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992-1997, 2000-2015 Free Software
+;; Foundation, Inc.
 
 ;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
 ;; Maintainer: emacs-devel@gnu.org
@@ -2015,7 +2015,7 @@ Actual changes in files cannot be undone by Emacs."))
   "Edit Dired buffer with Wdired, or make it read-only.
 If the current buffer can be edited with Wdired, (i.e. the major
 mode is `dired-mode'), call `wdired-change-to-wdired-mode'.
-Otherwise, call `toggle-read-only'."
+Otherwise, toggle `read-only-mode'."
   (interactive)
   (if (derived-mode-p 'dired-mode)
       (wdired-change-to-wdired-mode)
@@ -3059,7 +3059,7 @@ or \"* [3 files]\"."
   (when dired-shrink-to-fit
     ;; Try to not delete window when we want to display less than
     ;; `window-min-height' lines.
-    (fit-window-to-buffer (get-buffer-window buf) nil 1)))
+    (fit-window-to-buffer (get-buffer-window buf) nil 1 nil nil t)))
 
 (defcustom dired-no-confirm nil
   "A list of symbols for commands Dired should not confirm, or t.
@@ -3099,21 +3099,25 @@ 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*"))))
-      (with-current-buffer buffer
-       (with-current-buffer-window
-        buffer
-        (cons 'display-buffer-below-selected
-              '((window-height . fit-window-to-buffer)))
-        #'(lambda (window _value)
-            (with-selected-window window
-              (unwind-protect
-                  (apply function args)
-                (when (window-live-p window)
-                  (quit-restore-window window 'kill)))))
-        ;; Handle (t FILE) just like (FILE), here.  That value is
-        ;; used (only in some cases), to mean just one file that was
-        ;; marked, rather than the current line file.
+    (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-displayed-buffer-window
+       buffer
+       (cons 'display-buffer-below-selected
+            '((window-height . fit-window-to-buffer)
+              (preserve-size . (nil . t))))
+       #'(lambda (window _value)
+          (with-selected-window window
+            (unwind-protect
+                (apply function args)
+              (when (window-live-p window)
+                (quit-restore-window window 'kill)))))
+       ;; Handle (t FILE) just like (FILE), here.  That value is
+       ;; used (only in some cases), to mean just one file that was
+       ;; marked, rather than the current line file.
+       (with-current-buffer buffer
         (dired-format-columns-of-files
          (if (eq (car files) t) (cdr files) files))
         (remove-text-properties (point-min) (point-max)
@@ -3880,7 +3884,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
 \f
 ;;; Start of automatically extracted autoloads.
 \f
-;;;### (autoloads nil "dired-aux" "dired-aux.el" "1448837b5f3e2b9ad63f723361f1e32e")
+;;;### (autoloads nil "dired-aux" "dired-aux.el" "73269f48e7fe2fd0ac580fd69252b33a")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\