aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authorAlexander Griffith <griffitaj@gmail.com>2018-03-16 04:00:28 -0400
committerJohnson Denen <johnson.denen@gmail.com>2018-08-10 22:20:04 -0400
commit2346da19a129b27f2dc68677522475f145adde50 (patch)
treeaea1b52d2e666259f8f5d377193aa4de840f0ea3 /lisp/mastodon-tl.el
parentc9fc274a0e30e0193698dd9b6afcc69f2fa37a0a (diff)
Add user profiles closes #165 (#186)
* Add user profiles - added keybinding U for opening user profiles - (also added vimish keybindings 'h' and 'l' as aliased for tab and stab in mastodon-mode to compliment jk nav) - autoloads 'mastodon-profile--get-next-author
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 4790589..00dc50c 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -372,7 +372,7 @@ it is `mastodon-tl--byline-boosted'"
"Returns a propertized text giving the rendering of the given HTML string STRING.
The contents comes from the given TOOT which is used in parsing
-links in the text."
+links in the text. If TOOT is nil no parsing occurs."
(with-temp-buffer
(insert string)
(let ((shr-use-fonts mastodon-tl--enable-proportional-fonts)
@@ -381,12 +381,13 @@ links in the text."
(shr-render-region (point-min) (point-max)))
;; Make all links a tab stop recognized by our own logic, make things point
;; to our own logic (e.g. hashtags), and update keymaps where needed:
- (let (region)
- (while (setq region (mastodon-tl--find-property-range
- 'shr-url (or (cdr region) (point-min))))
- (mastodon-tl--process-link toot
- (car region) (cdr region)
- (get-text-property (car region) 'shr-url))))
+ (when toot
+ (let (region)
+ (while (setq region (mastodon-tl--find-property-range
+ 'shr-url (or (cdr region) (point-min))))
+ (mastodon-tl--process-link toot
+ (car region) (cdr region)
+ (get-text-property (car region) 'shr-url)))))
(buffer-string)))
(defun mastodon-tl--process-link (toot start end url)