aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-03-15 10:43:21 +0100
committermarty hiatt <martianhiatus@riseup.net>2024-03-15 10:50:50 +0100
commit3711c59984ab369fb5fc575e8a55fb26b2a2be51 (patch)
treeb01022df61f073f3e4e2a95f853a173eb6691309 /lisp/mastodon-toot.el
parent59f5f9ff99359cc1cefaf84194a194af2ee1fadb (diff)
toot-compose: only call mode funs if not buffer-exists
this avoids wiping prev set buf-local vars
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 7d2e467..a332706 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1851,8 +1851,11 @@ EDIT means we are editing an existing toot, not composing a new one."
(previous-window-config (list (current-window-configuration)
(point-marker))))
(switch-to-buffer-other-window buffer)
- (text-mode)
- (mastodon-toot-mode t)
+ ;; if a user hits reply while a compose buffer is already open,
+ ;; we really ought to wipe it all and start over.
+ (unless buffer-exists ; don't nuke buffer-local vars
+ (text-mode)
+ (mastodon-toot-mode t))
(setq mastodon-toot--visibility
(or (plist-get mastodon-profile-account-settings 'privacy)
;; use toot visibility setting from the server: