From 512338fe35444f6452c26a6abb274a48669a1ec0 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 2 Aug 2023 11:42:51 +0200 Subject: indent -media.el --- lisp/mastodon-media.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/mastodon-media.el b/lisp/mastodon-media.el index 5ccc3c4..5cd233a 100644 --- a/lisp/mastodon-media.el +++ b/lisp/mastodon-media.el @@ -193,7 +193,7 @@ REGION-LENGTH is the range from start to propertize." `(:max-height ,mastodon-media--preview-max-height)))))) (let ((buffer (current-buffer)) (marker (copy-marker start)) - (url-show-status nil)) ; stop url.el from spamming us about connecting + (url-show-status nil)) ; stop url.el from spamming us about connecting (condition-case nil ;; catch any errors in url-retrieve so as to not abort ;; whatever called us -- cgit v1.2.3 From 3480a3c8d00ff8efaf16d6e974184851c2c566c1 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 16 Aug 2023 12:49:07 +0200 Subject: add 'cursor-face 'hightlight to insert-status. --- lisp/mastodon-tl.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 360aeaa..3171dd7 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1317,7 +1317,8 @@ THREAD means the status will be displayed in a thread view." (or base-toot toot)) ; else normal toot with reblog check 'toot-json toot - 'base-toot base-toot) + 'base-toot base-toot + 'cursor-face 'highlight) "\n") (when mastodon-tl--display-media-p (mastodon-media--inline-images start-pos (point))))) -- cgit v1.2.3 From 6a843d3952219f4c4451d8176c51128387619058 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 16 Aug 2023 12:50:05 +0200 Subject: remove error call in rendering html http response. --- lisp/mastodon-http.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el index 663e2a9..ab621a2 100644 --- a/lisp/mastodon-http.el +++ b/lisp/mastodon-http.el @@ -186,8 +186,8 @@ STRING should be a HTML for a 404 errror." (with-temp-buffer (insert string) (shr-render-buffer (current-buffer)) - (view-mode) ; for 'q' to kill buffer and window - (error ""))) ; stop subsequent processing + (view-mode))) ; for 'q' to kill buffer and window + ;; (error ""))) ; stop subsequent processing (defun mastodon-http--process-response (&optional no-headers vector) "Process http response. -- cgit v1.2.3 From 03841b31f2a0a1b579618271d81eeecdbed062fb Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 16 Aug 2023 12:54:13 +0200 Subject: add defcustom: mastodon-tl--highlight-current-toot. --- lisp/mastodon-tl.el | 6 +++++- lisp/mastodon.el | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'lisp') 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) -- cgit v1.2.3