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-27 22:54:34 -0400 |
commit | 58a5e2deef6dff294607cf8d01b27d0ef8a65e4e (patch) | |
tree | 002029f7022b2c5989922b742a563d0cf3ad5751 /lisp/mastodon-notifications.el | |
parent | 123c7cf0a5ad4ab3f6eb86fd18daefa37e29d253 (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) |