aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-notifications.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-16 12:47:17 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-16 12:47:17 +0100
commit44e3f3796c529ea3b52be54be4636ca8d6f54c3f (patch)
tree0ab6eaaaf518e5adcf7ea53f681070112bb8dc66 /lisp/mastodon-notifications.el
parent8b7471b154fb636181be86268013039f78215a56 (diff)
notifications - use local map with foll-req acc/rej
this way we can remove these bindings from mastodon mode map
Diffstat (limited to 'lisp/mastodon-notifications.el')
-rw-r--r--lisp/mastodon-notifications.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 7c5d40b..f05e670 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -73,6 +73,15 @@
("Posted a poll" . "that has now ended"))
"Alist of subjects for notification types.")
+(defvar mastodon-notifications--map
+ (let ((map
+ (copy-keymap mastodon-mode-map)))
+ (define-key map (kbd "a") #'mastodon-notifications--follow-request-accept)
+ (define-key map (kbd "j") #'mastodon-notifications--follow-request-reject)
+ (define-key map (kbd "g") #'mastodon-notifications--get)
+ (keymap-canonicalize map))
+ "Keymap for viewing notifications.")
+
(defun mastodon-notifications--byline-concat (message)
"Add byline for TOOT with MESSAGE."
(concat
@@ -265,7 +274,8 @@ of the toot responded to."
(mastodon-tl--init-sync
"notifications"
"notifications"
- 'mastodon-notifications--timeline))
+ 'mastodon-notifications--timeline)
+ (use-local-map mastodon-notifications--map))
(defun mastodon-notifications--clear-all ()
"Clear all notifications."