Improve channels keymap

This commit is contained in:
Miguel de la Cruz 2022-06-01 11:28:14 +02:00
parent fb76618919
commit 4e9a055cd0

View file

@ -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