diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-08-17 21:11:28 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-08-17 21:11:28 +0200 |
commit | b427d486a7621c10b2cc898919bd02bf3c25b423 (patch) | |
tree | c5e5e250e8abcebc6e3872d2e24138f5f98c85f0 | |
parent | 20dec8871c9bb5f5e418bfc197e7533b5e3065e3 (diff) | |
parent | 03841b31f2a0a1b579618271d81eeecdbed062fb (diff) |
Merge branch 'develop'
-rw-r--r-- | lisp/mastodon-http.el | 4 | ||||
-rw-r--r-- | lisp/mastodon-media.el | 2 | ||||
-rw-r--r-- | lisp/mastodon-tl.el | 7 | ||||
-rw-r--r-- | lisp/mastodon.el | 9 |
4 files changed, 17 insertions, 5 deletions
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. 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 diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 360aeaa..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 @@ -1317,7 +1321,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 '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) |