]> git.eshelyaron.com Git - emacs.git/commitdiff
Adapt 2011-07-05 switch-to-buffer changes to new switch-to-buffer
authorChong Yidong <cyd@stupidchicken.com>
Thu, 14 Jul 2011 01:40:30 +0000 (21:40 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Thu, 14 Jul 2011 01:40:30 +0000 (21:40 -0400)
* lisp/bindings.el (mode-line-other-buffer):
* lisp/bookmark.el (bookmark-bmenu-2-window):
* lisp/bs.el (bs-cycle-next, bs-cycle-previous):
* lisp/net/tramp-cmds.el (tramp-append-tramp-buffers): Revert to using
switch-to-buffer.

* lisp/net/tramp-compat.el (tramp-compat-pop-to-buffer-same-window):
Deleted.

lisp/ChangeLog
lisp/bindings.el
lisp/bookmark.el
lisp/bs.el
lisp/net/tramp-cmds.el
lisp/net/tramp-compat.el

index 4aa24d499e2caf9f6b046d9d04195a8c4b0dc13e..1778fa9bc97429b0c9301a32025f95c4e77640d4 100644 (file)
@@ -1,3 +1,14 @@
+2011-07-14  Chong Yidong  <cyd@stupidchicken.com>
+
+       * bindings.el (mode-line-other-buffer):
+       * bookmark.el (bookmark-bmenu-2-window):
+       * bs.el (bs-cycle-next, bs-cycle-previous):
+       * net/tramp-cmds.el (tramp-append-tramp-buffers): Revert to using
+       switch-to-buffer.
+
+       * net/tramp-compat.el (tramp-compat-pop-to-buffer-same-window):
+       Deleted.
+
 2011-07-14  Juanma Barranquero  <lekktu@gmail.com>
 
        * follow.el (follow-debug-message, follow-redisplay):
index 57601637ed6d4ba970fb6219681986c917636215..3d7135c16de72dac37f67c42a1353327f188251a 100644 (file)
@@ -471,8 +471,7 @@ Like `bury-buffer', but temporarily select EVENT's window."
 (defun mode-line-other-buffer () "\
 Switch to the most recently selected buffer other than the current one."
   (interactive)
-  (with-no-warnings ; We really do want to call `switch-to-buffer' here.
-    (switch-to-buffer (other-buffer))))
+  (switch-to-buffer (other-buffer) nil t))
 
 (defun mode-line-next-buffer (event)
   "Like `next-buffer', but temporarily select EVENT's window."
index 9f90ecedc4d48cd1c7c0f90de38321789f31b7ef..bb7ad153e8bd1c7bf079cd860e6accbeb7d94cbf 100644 (file)
@@ -1841,8 +1841,7 @@ With a prefix arg, prompts for a file to save them in."
         (menu (current-buffer))
         (pop-up-windows t))
     (delete-other-windows)
-    (with-no-warnings ; We really do want to call `switch-to-buffer' here.
-      (switch-to-buffer (other-buffer)))
+    (switch-to-buffer (other-buffer) nil t)
     (bookmark--jump-via bmrk 'pop-to-buffer)
     (bury-buffer menu)))
 
index c7326eedd266c77842a9ce426334f60fb251e165..49ffb3f822c670c3fafe637738ec1b0730fbe436 100644 (file)
@@ -1215,8 +1215,7 @@ by buffer configuration `bs-cycle-configuration-name'."
         ;; We don't want the frame iconified if the only window in the frame
         ;; happens to be dedicated.
         (bury-buffer (current-buffer))
-        (with-no-warnings ; We really do want to call `switch-to-buffer' here.
-          (switch-to-buffer next))
+       (switch-to-buffer next nil t)
        (setq bs--cycle-list (append (cdr cycle-list)
                                     (list (car cycle-list))))
        (bs-message-without-log "Next buffers: %s"
@@ -1245,8 +1244,7 @@ by buffer configuration `bs-cycle-configuration-name'."
                                            bs--cycle-list)))
             (prev-buffer (car tupel))
             (cycle-list (cdr tupel)))
-        (with-no-warnings ; We really do want to call `switch-to-buffer' here.
-          (switch-to-buffer prev-buffer))
+       (switch-to-buffer prev-buffer nil t)
        (setq bs--cycle-list (append (last cycle-list)
                                     (reverse (cdr (reverse cycle-list)))))
        (bs-message-without-log "Previous buffers: %s"
index f20040e8a9a98b974c1600ef558674dfab6487c4..fcf523a706859161cabfb1b42ed3ddb4db9923e9 100644 (file)
@@ -308,7 +308,7 @@ buffer in your bug report.
 
       ;; There is at least one Tramp buffer.
       (when buffer-list
-       (tramp-compat-pop-to-buffer-same-window (list-buffers-noselect nil))
+       (switch-to-buffer (list-buffers-noselect nil))
        (delete-other-windows)
        (setq buffer-read-only nil)
        (goto-char (point-min))
@@ -343,7 +343,7 @@ the debug buffer(s).")
            ;; OK, let's send.  First we delete the buffer list.
            (progn
              (kill-buffer nil)
-             (tramp-compat-pop-to-buffer-same-window curbuf)
+             (switch-to-buffer curbuf)
              (goto-char (point-max))
              (insert "\n\
 This is a special notion of the `gnus/message' package.  If you
index e7ea4354b51f69cb81a5c2205fd4a74337d96c71..460c9f0e118e5fcd9a1566cfa258b3c16589670c 100644 (file)
@@ -502,15 +502,6 @@ EOL-TYPE can be one of `dos', `unix', or `mac'."
                        "`dos', `unix', or `mac'")))))
         (t (error "Can't change EOL conversion -- is MULE missing?"))))
 
-;; `pop-to-buffer-same-window'  has been introduced with Emacs 24.1.
-(defun tramp-compat-pop-to-buffer-same-window
-  (&optional buffer-or-name norecord label)
-  "Pop to buffer specified by BUFFER-OR-NAME in the selected window."
-  (if (fboundp 'pop-to-buffer-same-window)
-      (tramp-compat-funcall
-       'pop-to-buffer-same-window buffer-or-name norecord label)
-    (tramp-compat-funcall 'switch-to-buffer buffer-or-name norecord)))
-
 (add-hook 'tramp-unload-hook
          (lambda ()
            (unload-feature 'tramp-compat 'force)))