From e9920d64b5283fca6a34b2144a5a35c4c1d02938 Mon Sep 17 00:00:00 2001 From: Alexander Griffith Date: Mon, 5 Mar 2018 21:45:45 -0500 Subject: Retoot add accts closes #155 When responding to toots the full acct for both local and federated accounts are now added to the new toot buffer. Changes - Added a function in mastodon.el to return the current user acct - Added mastodon-toot--process-local, which takes an acct and appends the current server if it is local returns an empty string if the acct matches the current user and does only adds a prefix @ if the acct is federated - mastodon-toot--mentions will return a formatted string of mentions or an empty string - adds tests for mastodon-toot--mentions - adds a missing , in mastodon-http--post - `mastodon-toot--reply` now passes `mastodon-toot` a toot-id rather than the whole json - 'mastodon-toot--reply-to-id is now a local var in a new toot --- lisp/mastodon-tl.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index d6f7d04..252cefd 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -135,6 +135,7 @@ This also skips tab items in invisible text, i.e. hidden spoiler text." (search-pos (point))) (while (and (setq next-range (mastodon-tl--find-next-or-previous-property-range 'mastodon-tab-stop search-pos nil)) + (get-text-property (car next-range) 'invisible) (setq search-pos (1+ (cdr next-range)))) ;; do nothing, all the action in in the while condition @@ -397,7 +398,6 @@ TIME-STAMP is assumed to be in the past." (list 'invisible (not (get-text-property (car spoiler-text-region) 'invisible))))))) - (defun mastodon-tl--make-link (string link-type) "Return a propertized version of STRING that will act like link. @@ -488,6 +488,7 @@ message is a link which unhides/hides the main body." (insert (concat ;; remove trailing whitespace + (replace-regexp-in-string "[\t\n ]*\\'" "" (if (mastodon-tl--has-spoiler toot) -- cgit v1.2.3