]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix some pop-to-buffer callers.
authorMartin Rudalics <rudalics@gmx.at>
Sat, 8 Jan 2011 19:29:04 +0000 (20:29 +0100)
committerMartin Rudalics <rudalics@gmx.at>
Sat, 8 Jan 2011 19:29:04 +0000 (20:29 +0100)
lisp/ChangeLog
lisp/net/ange-ftp.el
lisp/vc/log-edit.el
lisp/vc/pcvs-util.el
lisp/vc/pcvs.el
lisp/vc/vc-dir.el

index 285a3cc5517bfbf6afd1971e7d5ca0e1d3171232..b9e0ac55426706fde6440f370afd9822249dbb9d 100644 (file)
@@ -1,3 +1,19 @@
+2011-01-08  Martin Rudalics  <rudalics@gmx.at>
+
+       * net/ange-ftp.el (ange-ftp-error): Use
+       pop-to-buffer-same-frame-other-window.
+
+       * vc/log-edit.el (log-edit-show-files): Use
+       pop-to-buffer-same-frame.
+
+       * vc/pcvs-util.el (cvs-pop-to-buffer-same-frame): Remove.
+
+       * vc/pcvs.el (cvs-cmd-do, cvs-quickdir): Do not bind
+       pop-up-windows.
+       (cvs-do-removal): Call pop-to-buffer-same-frame.
+
+       * vc/vc-dir.el (vc-dir): Do not bind pop-up-windows.
+
 2011-01-08  Glenn Morris  <rgm@gnu.org>
 
        * makefile.w32-in (EMACSOPT): Add --no-site-lisp.
index 070916634716ced538a59a579070c27666541ee8..7dd1210f63383f559f4d528ee889cedabf37f308 100644 (file)
@@ -1485,9 +1485,8 @@ only return the directory part of FILE."
 ;; USER pair, and signal an error including MSG in the text.
 (defun ange-ftp-error (host user msg)
   (save-excursion  ;; Prevent pop-to-buffer from changing current buffer.
-    (let ((cur (selected-window))
-         (pop-up-windows t))
-      (pop-to-buffer
+    (let ((cur (selected-window)))
+      (pop-to-buffer-same-frame-other-window
        (get-buffer-create
        (ange-ftp-ftp-process-buffer host user)))
       (goto-char (point-max))
index c7f37c5001184df5c7101520123878e1c0698b21..5ca746a14a59e795fdae31d3088d3de85799ae3e 100644 (file)
@@ -528,7 +528,7 @@ If you want to abort the commit, simply delete the buffer."
       (setq buffer-read-only t)
       (goto-char (point-min))
       (save-selected-window
-       (cvs-pop-to-buffer-same-frame buf)
+       (pop-to-buffer-same-frame buf)
        (shrink-window-if-larger-than-buffer)
        (selected-window)))))
 
index f3f579bf6a234bc9a0a9d601c3738fac65497d99..bc527350879588c3ee2ff8627833b7a893780c25 100644 (file)
@@ -81,14 +81,6 @@ the other elements.  The ordering among elements is maintained."
 ;;; frame, window, buffer handling
 ;;;
 
-(defun cvs-pop-to-buffer-same-frame (buf)
-  "Pop to BUF like `pop-to-buffer' but staying on the same frame.
-If `pop-to-buffer' would have opened a new frame, this function would
-try to split a new window instead."
-  (pop-to-buffer
-   (current-buffer) '(same-frame (new-window (selected . below))
-                                (reuse-buffer-window . nil))))
-
 (defun cvs-bury-buffer (buf &optional mainbuf)
   "Hide the buffer BUF that was temporarily popped up.
 BUF is assumed to be a temporary buffer used from the buffer MAINBUF."
index 305e109b6d6e217fd779cbd033b9a9cae1eb377c..c13565f500ca9ef3a152e01fc2ec2bbde9f54dba 100644 (file)
@@ -495,11 +495,9 @@ If non-nil, NEW means to create a new buffer no matter what."
     (cvs-mode-run cmd flags fis
                  :cvsargs cvsargs :dont-change-disc dont-change-disc)
 
-    (if noshow cvsbuf
-      (let ((pop-up-windows nil)) (pop-to-buffer cvsbuf)))))
-;;      (funcall (if (and (boundp 'pop-up-frames) pop-up-frames)
-;;                'pop-to-buffer 'switch-to-buffer)
-;;            cvsbuf))))
+    (if noshow
+       cvsbuf
+      (pop-to-buffer cvsbuf))))
 
 (defun cvs-run-process (args fis postprocess &optional single-dir)
   (assert (cvs-buffer-p cvs-buffer))
@@ -1018,8 +1016,9 @@ FLAGS is ignored."
                            (eq cvs-auto-remove-handled t)
                            cvs-auto-remove-directories
                            nil)
-    (if noshow cvsbuf
-      (let ((pop-up-windows nil)) (pop-to-buffer cvsbuf)))))
+    (if noshow
+       cvsbuf
+      (pop-to-buffer cvsbuf))))
 
 ;;;###autoload
 (defun cvs-examine (directory flags &optional noshow)
@@ -2148,7 +2147,7 @@ Returns a list of FIS that should be `cvs remove'd."
       (with-current-buffer tmpbuf
        (let ((inhibit-read-only t))
          (cvs-insert-strings (mapcar 'cvs-fileinfo->full-name fis))
-         (cvs-pop-to-buffer-same-frame (current-buffer))
+         (pop-to-buffer-same-frame (current-buffer))
          (shrink-window-if-larger-than-buffer))))
     (if (not (or silent
                 (unwind-protect
index cd40468199f7241640baf3bdd497e09e0420f739..544c0b4b8577c775c68df8a75027eb3e148f2987 100644 (file)
@@ -1192,8 +1192,12 @@ These are the commands available for use in the file status buffer:
          nil t nil nil)))))
   (unless backend
     (setq backend (vc-responsible-backend dir)))
-  (let (pop-up-windows)                      ; based on cvs-examine; bug#6204
-    (pop-to-buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir backend)))
+  ;; Earlier this one did bind `pop-up-windows' to nil, based on
+  ;; cvs-examine; bug#6204.  Now, if a user wants to pop up this buffer
+  ;; in the same window, she should use the (reuse-window 'same )
+  ;; specifier for *vc-dir* buffers.
+  (pop-to-buffer
+   (vc-dir-prepare-status-buffer "*vc-dir*" dir backend))
   (if (derived-mode-p 'vc-dir-mode)
       (vc-dir-refresh)
     ;; FIXME: find a better way to pass the backend to `vc-dir-mode'.