From: Bastian Beischer Date: Wed, 18 Oct 2017 23:44:46 +0000 (+0300) Subject: Use pop-to-buffer-same-window instead of switch-to-buffer X-Git-Tag: emacs-26.0.91~523 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b8433b0954b26d4620a3154be025fb8a49a73954;p=emacs.git Use pop-to-buffer-same-window instead of switch-to-buffer * lisp/cedet/semantic/decorate/include.el (semantic-decoration-include-visit): Use pop-to-buffer-same-window instead of switch-to-buffer (bug#28645). * lisp/cedet/semantic/analyze/refs.el (semantic-analyze-proto-impl-toggle): Same. * lisp/cedet/semantic/senator.el (senator-go-to-up-reference): Same. * lisp/cedet/semantic/mru-bookmark.el (semantic-mrub-visit): Same. * lisp/cedet/semantic/complete.el (semantic-complete-jump): Same. Copyright-paperwork-exempt: yes --- diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el index 55fcd830433..a58479f5054 100644 --- a/lisp/cedet/semantic/analyze/refs.el +++ b/lisp/cedet/semantic/analyze/refs.el @@ -348,7 +348,7 @@ Only works for tags in the global namespace." (push-mark) (semantic-go-to-tag target) - (switch-to-buffer (current-buffer)) + (pop-to-buffer-same-windown (current-buffer)) (semantic-momentary-highlight-tag target)) ) diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index ff8e61e54dc..325ca1f4414 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -2120,7 +2120,7 @@ completion works." (when (semantic-tag-p tag) (push-mark) (semantic-go-to-tag tag) - (switch-to-buffer (current-buffer)) + (pop-to-buffer-same-window (current-buffer)) (semantic-momentary-highlight-tag tag) (message "%S: %s " (semantic-tag-class tag) diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el index 6876e5f3a46..9f1825d4208 100644 --- a/lisp/cedet/semantic/decorate/include.el +++ b/lisp/cedet/semantic/decorate/include.el @@ -467,7 +467,7 @@ its contents. (error "Could not location include %s" (semantic-tag-name tag))) ((get-file-buffer file) - (switch-to-buffer (get-file-buffer file))) + (pop-to-buffer-same-window (get-file-buffer file))) ((stringp file) (find-file file)) )))) diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index 5fa58e08ea6..24863de01b1 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el @@ -113,7 +113,7 @@ Uses `semantic-go-to-tag' and highlighting." (forward-char o)) (error nil)) ;; make it visible - (switch-to-buffer (current-buffer)) + (pop-to-buffer-same-window (current-buffer)) (semantic-momentary-highlight-tag tag) )) diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el index e86658628b5..70e04475ab2 100644 --- a/lisp/cedet/semantic/senator.el +++ b/lisp/cedet/semantic/senator.el @@ -530,11 +530,11 @@ Some tags such as includes have other reference features." ;; A tag ((semantic-tag-p result) (semantic-go-to-tag result) - (switch-to-buffer (current-buffer)) + (pop-to-buffer-same-window (current-buffer)) (semantic-momentary-highlight-tag result)) ;; Buffers ((bufferp result) - (switch-to-buffer result) + (pop-to-buffer-same-window result) (pulse-momentary-highlight-one-line (point))) ;; Files ((and (stringp result) (file-exists-p result))