From 3711c59984ab369fb5fc575e8a55fb26b2a2be51 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 15 Mar 2024 10:43:21 +0100 Subject: toot-compose: only call mode funs if not buffer-exists this avoids wiping prev set buf-local vars --- lisp/mastodon-toot.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lisp') 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: -- cgit v1.2.3