[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mastodon dad54cccbc 46/63: fold-post-toggle
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mastodon dad54cccbc 46/63: fold-post-toggle |
Date: |
Sun, 4 Aug 2024 04:00:39 -0400 (EDT) |
branch: elpa/mastodon
commit dad54cccbcc2385315ff8c32369bb607a937d15d
Author: marty hiatt <martianhiatus@riseup.net>
Commit: marty hiatt <martianhiatus@riseup.net>
fold-post-toggle
---
lisp/mastodon-tl.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index ad8cc1a5e7..a357146cc4 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1619,6 +1619,17 @@ Folding decided by `mastodon-tl--fold-toots-at-length'."
(interactive)
(mastodon-tl--unfold-post :fold))
+(defun mastodon-tl--fold-post-toggle ()
+ "Toggle the folding status of the toot at point."
+ (interactive)
+ (let* ((byline-p (mastodon-tl--property 'byline))
+ (read-more-p (save-excursion
+ (when byline-p
+ (previous-line)
+ (beginning-of-line))
+ (mastodon-tl--property 'read-more))))
+ (mastodon-tl--unfold-post (if (not read-more-p) :fold))))
+
;; from mastodon-alt.el:
(defun mastodon-tl--toot-for-stats (&optional toot)
"Return the TOOT on which we want to extract stats.
- [nongnu] elpa/mastodon 46b66e332a 58/63: commentary, (continued)
- [nongnu] elpa/mastodon 46b66e332a 58/63: commentary, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 7b4d77b86b 10/63: tl: no-refresh for next-item in --single-toot, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon b8e8328a35 04/63: use with-toot-item and clean up functions that use it, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 6721f40cfd 30/63: unfold toot: replace whole item on unfolding (so we have props!), ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 41404473ea 05/63: toot.el: user-error not message when needed, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 534644d2bd 13/63: toot: default to emoji.el, emojify customize, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 3ba86999d3 26/63: flymake toot.el, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 43cd626f6a 28/63: Merge branch 'emoji.el' into develop, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon c95a19b2d5 33/63: index update, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon bc83b400b1 40/63: fix unfolding faved/bookmarked toots, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon dad54cccbc 46/63: fold-post-toggle,
ELPA Syncer <=
- [nongnu] elpa/mastodon 80ce719004 38/63: flymake our user-error mess, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 35a26600af 53/63: reimplement folding via insert body only., ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 0ef13ab348 55/63: fix prev-item-id, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 49261b91b0 59/63: Revert "replace persist with multisession", ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 351bd73875 54/63: fix prev-item-id, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 712a2af648 29/63: update info, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 0cd77c1880 37/63: Merge branch 'with-toot-item' into develop, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 82931c0869 14/63: readme, emoji, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 4e8d286164 12/63: mastodon-use-emojify customize, ELPA Syncer, 2024/08/04
- [nongnu] elpa/mastodon 4697c073e8 19/63: message -> user-error, ELPA Syncer, 2024/08/04