Local variables work after a switch-to-buffer but not inside a with-current-buffer

This commit is contained in:
Miguel de la Cruz 2022-06-02 14:26:11 +02:00
parent 7de96b524b
commit 44fb954ef9

View file

@ -262,8 +262,6 @@ user to check their status and select between them")
(defun mattermost-prompt () (defun mattermost-prompt ()
"Shows the message prompt" "Shows the message prompt"
(setq mattermost-prompt-marker (make-marker)
mattermost-insert-marker (make-marker))
(end-of-buffer) (end-of-buffer)
(set-marker mattermost-insert-marker (point)) (set-marker mattermost-insert-marker (point))
(setq prompt (propertize ">> " (setq prompt (propertize ">> "
@ -319,10 +317,12 @@ user to check their status and select between them")
(dolist (post-id order) (dolist (post-id order)
(let ((post (plist-get posts (mattermost-string->keyword post-id)))) (let ((post (plist-get posts (mattermost-string->keyword post-id))))
(mattermost-insert-post post)))) (mattermost-insert-post post))))
(mattermost-prompt)
(mattermost-channel-mode)) (mattermost-channel-mode))
(switch-to-buffer chanb) (switch-to-buffer chanb)
(setq mattermost-channel-id id) (setq mattermost-channel-id id)
(setq mattermost-prompt-marker (make-marker))
(setq mattermost-insert-marker (make-marker))
(mattermost-prompt)
(end-of-buffer))) (end-of-buffer)))
(defun mattermost () (defun mattermost ()