emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mastodon db227a8c25 31/63: flip an if clause


From: ELPA Syncer
Subject: [nongnu] elpa/mastodon db227a8c25 31/63: flip an if clause
Date: Sun, 4 Aug 2024 04:00:33 -0400 (EDT)

branch: elpa/mastodon
commit db227a8c2572f9985370325eca9f47d697531697
Author: marty hiatt <martianhiatus@riseup.net>
Commit: marty hiatt <martianhiatus@riseup.net>

    flip an if clause
---
 lisp/mastodon-toot.el | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index e1d725933b..4b1e22574b 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1849,20 +1849,20 @@ Added to `after-change-functions' in new toot buffers."
                    "Select draft toot: "
                    (multisession-value mastodon-toot-draft-toots-list)
                    nil t)))
-        (if (mastodon-toot--compose-buffer-p)
-            (when (and (not (mastodon-toot--empty-p :text-only))
-                       (y-or-n-p "Replace current text with draft?"))
-              (setf (multisession-value mastodon-toot-draft-toots-list)
-                    (cl-pushnew mastodon-toot-current-toot-text
-                                (multisession-value 
mastodon-toot-draft-toots-list)))
-              (goto-char
-               (cdr (mastodon-tl--find-property-range 'toot-post-header
-                                                      (point-min))))
-              (kill-region (point) (point-max))
-              ;; to not save to kill-ring:
-              ;; (delete-region (point) (point-max))
-              (insert text))
-          (mastodon-toot--compose-buffer nil nil nil text)))
+        (if (not (mastodon-toot--compose-buffer-p))
+            (mastodon-toot--compose-buffer nil nil nil text)
+          (when (and (not (mastodon-toot--empty-p :text-only))
+                     (y-or-n-p "Replace current text with draft?"))
+            (setf (multisession-value mastodon-toot-draft-toots-list)
+                  (cl-pushnew mastodon-toot-current-toot-text
+                              (multisession-value 
mastodon-toot-draft-toots-list)))
+            (goto-char
+             (cdr (mastodon-tl--find-property-range 'toot-post-header
+                                                    (point-min))))
+            (kill-region (point) (point-max))
+            ;; to not save to kill-ring:
+            ;; (delete-region (point) (point-max))
+            (insert text))))
     (unless (mastodon-toot--compose-buffer-p)
       (mastodon-toot--compose-buffer))
     (message "No drafts available.")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]