From 44fb954ef947509104c4784b496c012a58fd9501 Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Thu, 2 Jun 2022 14:26:11 +0200 Subject: [PATCH] Local variables work after a switch-to-buffer but not inside a with-current-buffer --- mattermost.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mattermost.el b/mattermost.el index 0de6cd9..b4e500b 100644 --- a/mattermost.el +++ b/mattermost.el @@ -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 ()