From 53ec54319b900ea67dd310de911aa0745beff4cc Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Sun, 22 May 2022 23:36:55 +0200 Subject: [PATCH] Add major mode, map and entrypoint function --- mattermost.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mattermost.el b/mattermost.el index 60095ba..b8d61cd 100644 --- a/mattermost.el +++ b/mattermost.el @@ -128,6 +128,21 @@ if the user is not present" (insert (format "> [%s] %s\n" channel-id (if (string= channel-display-name "") channel-name channel-display-name))))))))) +;; ToDo: define this better +(defvar mattermost-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "C-c f") '(lambda () (interactive) (message "keyyyy"))) + map) + "The keymap for mattermost-mode") + +(define-derived-mode mattermost-mode fundamental-mode "Mattermost" + "Mode to list the Mattermost teams and channels to allow the +user to check their status and select between them") + +(defun mattermost () + "Connect to a Mattermost instance" + (interactive) + ) ;; ToDo: remove (setq msgs (mattermost-get-channel-messages "68w17u1da7yg7enayudjjqqwse"))