diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-08-27 22:44:05 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-08-29 15:33:55 -0400 |
commit | d2a893484d68945f8535d36e7e14081f8c151b5e (patch) | |
tree | 50d90d2310c5d11566eeb0193a517a5c9ffa6a8f /lisp/mastodon-notifications.el | |
parent | 3212f5dd0b5716e1bb4db60fb65bd950c08ec12a (diff) |
* lisp/mastodon-notifications.el: Fix dependency
The file can't be loaded before `mastodon` because it requires
`mastodon-mode-map`, so just require it. Also make the keymap
definition more standard.
* lisp/mastodon-notifications.el: Require `mastodon`.
(mastodon-mode-map): Remove redundant declaration.
(mastodon-notifications--map): Avoid `copy-keymap` and
`keymap-canonicalize`.
Diffstat (limited to 'lisp/mastodon-notifications.el')
-rw-r--r-- | lisp/mastodon-notifications.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index df96122..5f6d1ba 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -31,12 +31,13 @@ ;;; Code: +(require 'mastodon) + (autoload 'mastodon-http--api "mastodon-http") (autoload 'mastodon-http--get-params-async-json "mastodon-http") (autoload 'mastodon-http--post "mastodon-http") (autoload 'mastodon-http--triage "mastodon-http") (autoload 'mastodon-media--inline-images "mastodon-media") -(autoload 'mastodon-notifications-get "mastodon") (autoload 'mastodon-tl--byline "mastodon-tl") (autoload 'mastodon-tl--byline-author "mastodon-tl") (autoload 'mastodon-tl--clean-tabs-and-nl "mastodon-tl") @@ -55,7 +56,6 @@ (defvar mastodon-tl--buffer-spec) (defvar mastodon-tl--display-media-p) -(defvar mastodon-mode-map) (defvar mastodon-notifications--types-alist '(("follow" . mastodon-notifications--follow) @@ -80,11 +80,12 @@ "Alist of subjects for notification types.") (defvar mastodon-notifications--map - (let ((map (copy-keymap mastodon-mode-map))) + (let ((map (make-sparse-keymap))) + (set-keymap-parent map 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 "C-k") #'mastodon-notifications--clear-current) - (keymap-canonicalize map)) + map) "Keymap for viewing notifications.") (defun mastodon-notifications--byline-concat (message) |