]> git.eshelyaron.com Git - emacs.git/commitdiff
Ensure dired-display-file displays it in other window.
authorRichard M. Stallman <rms@gnu.org>
Tue, 18 Mar 2014 12:07:01 +0000 (08:07 -0400)
committerRichard M. Stallman <rms@gnu.org>
Tue, 18 Mar 2014 12:07:01 +0000 (08:07 -0400)
* dired.el (dired-display-file): Force use of other window.

lisp/ChangeLog
lisp/dired.el

index e6155d7237a930e1dfa3a1d90cc13d3ae055f2d0..9bf92ae1b58829ce42d8f3f95e5e34e8a95d26ab 100644 (file)
@@ -7,6 +7,10 @@
        (http://lists.gnu.org/archive/html/emacs-devel/2014-03/msg00488.html)
        (comment-start-skip): Update the docstring.
 
+2014-03-18  Richard Stallman  <rms@gnu.org>
+
+       * dired.el (dired-display-file): Force use of other window.
+
 2014-03-18  Daniel Colascione  <dancol@dancol.org>
 
        * startup.el (tty-handle-args): Remove debug message from 2007.
        * net/shr.el (shr-tag-img): Prefer the title over the alt text
        (bug#16537).
 
+>>>>>>> MERGE-SOURCE
 2014-01-24  Juanma Barranquero  <lekktu@gmail.com>
 
        * net/eww.el (eww-download-callback):
index 162c9beb0c0fd443e5357c5bee8c4a3b96cb6db3..7cb22b1cc9b2a188437a28753c11948f71bfe35e 100644 (file)
@@ -2136,7 +2136,8 @@ Otherwise, display it in another buffer."
 (defun dired-display-file ()
   "In Dired, display this file or directory in another window."
   (interactive)
-  (display-buffer (find-file-noselect (dired-get-file-for-visit))))
+  (display-buffer (find-file-noselect (dired-get-file-for-visit))
+                 t))
 \f
 ;;; Functions for extracting and manipulating file names in Dired buffers.
 
@@ -3639,6 +3640,7 @@ With a prefix argument, edit the current listing switches instead."
        ;; Remove a switch of the form -XtY for some X and Y.
        (setq dired-actual-switches
              (replace-match "" t t dired-actual-switches 3))))
+
     ;; Now, if we weren't sorting by date before, add the -t switch.
     ;; Some simple-minded ls implementations (eg ftp servers) only
     ;; allow a single option string, so try not to add " -t" if possible.
@@ -3671,6 +3673,9 @@ Values matching `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp'
 set the minor mode accordingly, others appear literally in the mode line.
 With optional second arg NO-REVERT, don't refresh the listing afterwards."
   (dired-sort-R-check switches)
+  (unless (string-match "\\(\\`\\| \\)-\\([b-zA-Z]*\\)a"
+                       switches)
+    (debug "No -a in Dired switches"))
   (setq dired-actual-switches switches)
   (dired-sort-set-mode-line)
   (or no-revert (revert-buffer)))