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