diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-06 14:46:34 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-06 14:46:34 +0200 |
commit | 5970c9de908fbb8009de86a2371578de231b3cee (patch) | |
tree | 3c91818739b26a2533712104d71eff628fad821a /lisp/mastodon.el | |
parent | 4a4eaa48557c50c393af2a0b499023fad4474a24 (diff) |
Revert "updates to with-mastodon-buffer macro"
This reverts commit 59e5e3ece54bcac36d9debad392bff25a31438b5.
Diffstat (limited to 'lisp/mastodon.el')
-rw-r--r-- | lisp/mastodon.el | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 1fcb234..6b6ab9c 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -256,20 +256,14 @@ mastodon.el needs to be re-loaded for this to be correctly set.") "Face used for reply text in toot compose buffer. See `mastodon-toot-display-orig-in-reply-buffer'.") -(defmacro with-mastodon-buffer (buffer mode-fun other-window &rest body) - "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'." - (declare (debug t) - (indent defun)) +(defmacro with-mastodon-buffer (buffer &rest body) + "Evaluate BODY in a new `mastodon-mode' buffer called BUFFER." + (declare (debug 'body)) `(with-current-buffer (get-buffer-create ,buffer) (let ((inhibit-read-only t)) (erase-buffer) - (if ,other-window - (switch-to-buffer-other-window ,buffer) - (switch-to-buffer ,buffer)) - (funcall ,mode-fun) + (switch-to-buffer ,buffer) + (mastodon-mode) ,@body))) |