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.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index bac4d67..c9c3b64 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -289,7 +289,7 @@ See `mastodon-toot-display-orig-in-reply-buffer'.") (buffer-list))))) ; catch any other masto buffer (mastodon-return-credential-account :force) (if buffer - (switch-to-buffer buffer) + (display-buffer buffer) (mastodon-tl--get-home-timeline) (message "Loading Mastodon account %s on %s..." (mastodon-auth--user-acct) @@ -335,7 +335,7 @@ from the server and load anew." "*mastodon-notifications*"))) (if (and (not force) (get-buffer buffer)) - (progn (switch-to-buffer buffer) + (progn (display-buffer buffer) (mastodon-tl--update)) (message "Loading your notifications...") (mastodon-tl--init-sync (or buffer-name "notifications") -- cgit v1.2.3