diff options
author | clarkenciel <clarkenciel@gmail.com> | 2017-04-27 20:30:22 -0700 |
---|---|---|
committer | Johnson Denen <johnson.denen@gmail.com> | 2017-04-28 19:57:23 -0400 |
commit | 9c816bcecf46554f29600590f72fafc0ed001d6d (patch) | |
tree | 6d0666b30be7397c2389af4f33aff928beb63bcc /lisp | |
parent | e4dbf004008e5c7168e3f9b719a66266ba04c6e0 (diff) |
changing creation of toot buffer so that we don't duplicate docs
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-toot.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index af86b5f..5131191 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -186,10 +186,12 @@ If REPLY-TO-ID is provided, set the MASTODON-TOOT--REPLY-TO-ID var." "Create a new buffer to capture text for a new toot. If REPLY-TO-USER is provided, inject their handle into the message. If REPLY-TO-ID is provided, set the MASTODON-TOOT--REPLY-TO-ID var." - (let ((buffer (get-buffer-create "*new toot*"))) + (let* ((buffer-exists (get-buffer "*new toot*")) + (buffer (or buffer-exists (get-buffer-create "*new toot*")))) (switch-to-buffer-other-window buffer) - (mastodon-toot--display-docs) - (mastodon-toot--setup-as-reply reply-to-user reply-to-id) + (when (not buffer-exists) + (mastodon-toot--display-docs) + (mastodon-toot--setup-as-reply reply-to-user reply-to-id)) (mastodon-toot-mode t))) (defvar mastodon-toot-mode-map |