From 445d176b2a593a87afd3f6bca717feba639dfbdc Mon Sep 17 00:00:00 2001 From: Rahguzar Date: Sat, 6 Jan 2024 12:32:57 +0100 Subject: Replace 'switch-to-buffer' with 'display-buffer' or 'pop-to-buffer' This allows user to customize how buffers get shown using 'display-buffer-alist'. Also refactors mastodon-auth--show-notice. --- lisp/mastodon-tl.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 561087e..d4f3d04 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -287,7 +287,7 @@ It is active where point is placed by `mastodon-tl--goto-next-item.'") "Evaluate BODY in a new or existing buffer called BUFFER. MODE-FUN is called to set the major mode. OTHER-WINDOW means call `switch-to-buffer-other-window' rather -than `switch-to-buffer'." +than `pop-to-buffer'." (declare (debug t) (indent 3)) `(with-current-buffer (get-buffer-create ,buffer) @@ -296,7 +296,7 @@ than `switch-to-buffer'." (funcall ,mode-fun) (if ,other-window (switch-to-buffer-other-window ,buffer) - (switch-to-buffer ,buffer)) + (pop-to-buffer ,buffer '(display-buffer-same-window))) ,@body))) (defmacro mastodon-tl--do-if-item (&rest body) -- cgit v1.2.3