From 4e9a055cd0aba14fb8f04999055a11f032c07e75 Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Wed, 1 Jun 2022 11:28:14 +0200 Subject: [PATCH] Improve channels keymap --- mattermost.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mattermost.el b/mattermost.el index 4b90c23..0a62054 100644 --- a/mattermost.el +++ b/mattermost.el @@ -159,7 +159,9 @@ if the user is not present" ;; ToDo: define this better (defvar mattermost-root-mode-map (let ((map (make-sparse-keymap))) - (define-key map (kbd "C-c f") #'(lambda () (interactive) (message "keyyyy"))) + (define-key map (kbd "n") #'next-line) + (define-key map (kbd "p") #'previous-line) + (define-key map (kbd "q") #'bury-buffer) map) "The keymap for mattermost-root-mode") @@ -182,7 +184,9 @@ if the user is not present" (insert (format "> [%s] %s\n" channel-id (if (string= channel-display-name "") channel-name channel-display-name))))))))) - (switch-to-buffer rootb))) + (switch-to-buffer rootb) + (mattermost-root-mode) + (beginning-of-buffer))) (define-derived-mode mattermost-root-mode fundamental-mode "Mattermost Root" "Mode to list the Mattermost teams and channels to allow the