Forbid inserting text in between channel characters

This commit is contained in:
Miguel de la Cruz 2022-06-01 11:49:54 +02:00
parent 538321926f
commit 3a8d4b661c

View file

@ -169,14 +169,18 @@ if the user is not present"
(channel-id (plist-get channel :id)))
(message "button action! %s" channel-id)))
'channel channel)))
'channel channel
'read-only t
'rear-sticky t
'front-sticky t)))
(defun show-root ()
(defun mattermost-show-root ()
"Populates the Mattermost Root buffer and changes to it"
(interactive)
(let ((rootb (get-buffer-create "*Mattermost Root*")))
(with-current-buffer rootb
(let ((teams (mattermost-get-teams)))
(let ((inhibit-read-only t)
(teams (mattermost-get-teams)))
(erase-buffer)
(dolist (team teams)
(let* ((team-id (plist-get team :id))
@ -194,7 +198,7 @@ if the user is not present"
(define-key map (kbd "n") #'next-line)
(define-key map (kbd "p") #'previous-line)
(define-key map (kbd "q") #'bury-buffer)
(define-key map (kbd "g") #'show-root)
(define-key map (kbd "g") #'mattermost-show-root)
map)
"The keymap for mattermost-root-mode")
@ -214,7 +218,7 @@ user to check their status and select between them")
(mattermost-close)
(let ((password (mattermost-read-password)))
(mattermost-login mattermost-login-id password))
(show-root))
(mattermost-show-root))
(defun mattermost-close ()
"Closes the connection with the Mattermost server"