emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 b8433b0: Use pop-to-buffer-same-window instead of


From: Dmitry Gutov
Subject: [Emacs-diffs] emacs-26 b8433b0: Use pop-to-buffer-same-window instead of switch-to-buffer
Date: Wed, 18 Oct 2017 19:45:34 -0400 (EDT)

branch: emacs-26
commit b8433b0954b26d4620a3154be025fb8a49a73954
Author: Bastian Beischer <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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
---
 lisp/cedet/semantic/analyze/refs.el     | 2 +-
 lisp/cedet/semantic/complete.el         | 2 +-
 lisp/cedet/semantic/decorate/include.el | 2 +-
 lisp/cedet/semantic/mru-bookmark.el     | 2 +-
 lisp/cedet/semantic/senator.el          | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/cedet/semantic/analyze/refs.el 
b/lisp/cedet/semantic/analyze/refs.el
index 55fcd83..a58479f 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 ff8e61e..325ca1f 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 6876e5f..9f1825d 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 5fa58e0..24863de 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 e866586..70e0447 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]