branch: elpa/fedi
commit 0eb39785bc41c5b4c9b9a65acd473fbd1d6eadd0
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>

    with-buffer: only call mode-fun if not active (unure if right?)
---
 fedi.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fedi.el b/fedi.el
index 51c4af849c6..c9858a6c06f 100644
--- a/fedi.el
+++ b/fedi.el
@@ -169,7 +169,8 @@ than `switch-to-buffer'."
   `(with-current-buffer (get-buffer-create ,buffer)
      (let ((inhibit-read-only t))
        (erase-buffer)
-       (funcall ,mode-fun)
+       (unless (equal major-mode ,mode-fun)
+         (funcall ,mode-fun))
        (if ,other-window
            (switch-to-buffer-other-window ,buffer)
          ;; (switch-to-buffer ,buffer))

Reply via email to