diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-18 15:48:11 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-18 18:21:11 +0100 |
commit | 9b2bacb956e64cc68f3778da27362f353eed9421 (patch) | |
tree | a620650b88634bfb75f0269145910f67ebdf5df8 /lisp/mastodon-views.el | |
parent | 4a06f0c5c0cc8b70e51d6a816d55dc53fe7edcf8 (diff) |
views: comment on keymap inheritace - all maps inherit
Diffstat (limited to 'lisp/mastodon-views.el')
-rw-r--r-- | lisp/mastodon-views.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index 45317cf..544c362 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -68,6 +68,17 @@ ;;; KEYMAPS +;; copy `mastodon-mode-map' if possible, as then all timeline functions are +;; available. this is helpful because if a minor view is the only buffer left +;; open, calling `mastodon' will switch to it, but then we will be unable to +;; switch to timlines without closing the minor view. + +;; copying the mode map however means we need to avoid/unbind/override any +;; functions that might cause interfere with the minor view. + +;; this is not redundant, as while the buffer -init function calls +;; `mastodon-mode', it gets overridden in some but not all cases. + (defvar mastodon-views--view-filters-keymap (let ((map (copy-keymap mastodon-mode-map))) @@ -116,7 +127,9 @@ "Keymap for when point is on list name.") (defvar mastodon-views--scheduled-map - (let ((map (make-sparse-keymap))) + (let ((map ;(make-sparse-keymap))) + (copy-keymap mastodon-mode-map))) + ;; (let ((map (make-sparse-keymap))) (define-key map (kbd "n") 'mastodon-tl--goto-next-item) (define-key map (kbd "p") 'mastodon-tl--goto-prev-item) (define-key map (kbd "r") 'mastodon-views--reschedule-toot) |