aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/mastodon-tl.el6
-rw-r--r--lisp/mastodon.el9
2 files changed, 13 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 3171dd7..1d672a5 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -168,6 +168,10 @@ Note that you can hide replies on a one-off basis by loading a
timeline with a simple prefix argument, `C-u'."
:type '(boolean :tag "Whether to hide replies from the timelines."))
+(defcustom mastodon-tl--highlight-current-toot nil
+ "Whether to highlight the toot at point. Uses `cursor-face' special property."
+ :type '(boolean))
+
;;; VARIABLES
@@ -1318,7 +1322,7 @@ THREAD means the status will be displayed in a thread view."
toot)) ; else normal toot with reblog check
'toot-json toot
'base-toot base-toot
- 'cursor-face 'highlight)
+ 'cursor-face 'mastodon-cursor-highlight-face)
"\n")
(when mastodon-tl--display-media-p
(mastodon-media--inline-images start-pos (point)))))
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 53986cf..84d3d1d 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -99,6 +99,7 @@
(autoload 'mastodon-views--view-scheduled-toots "mastodon-views")
(autoload 'special-mode "simple")
+(defvar mastodon-tl--highlight-current-toot)
(defvar mastodon-notifications--map)
(defgroup mastodon nil
@@ -258,6 +259,10 @@ mastodon.el needs to be re-loaded for this to be correctly set.")
"Face used for reply text in toot compose buffer.
See `mastodon-toot-display-orig-in-reply-buffer'.")
+(defface mastodon-cursor-highlight-face
+ `((t :inherit highlight :extend t))
+ "Face for `mastodon-tl--highlight-current-toot'.")
+
;;;###autoload
(defun mastodon ()
"Connect Mastodon client to `mastodon-instance-url' instance."
@@ -401,7 +406,9 @@ Calls `mastodon-tl--get-buffer-type', which see."
(when (require 'emojify nil :noerror)
(emojify-mode t)
(when mastodon-toot--enable-custom-instance-emoji
- (mastodon-toot--enable-custom-emoji)))))
+ (mastodon-toot--enable-custom-emoji))
+ (when mastodon-tl--highlight-current-toot
+ (cursor-face-highlight-mode)))))
;;;###autoload
(add-hook 'mastodon-mode-hook #'mastodon-profile--fetch-server-account-settings)