aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sx-interaction.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/sx-interaction.el b/sx-interaction.el
index da08581..177a054 100644
--- a/sx-interaction.el
+++ b/sx-interaction.el
@@ -93,10 +93,11 @@ If it's not a question, or if it is read, return DATA."
If BUFFER is not live, nothing is done."
(setq buffer (or buffer (current-buffer)))
(when (buffer-live-p buffer)
- (cond ((derived-mode-p 'sx-question-list-mode)
- (sx-question-list-refresh 'redisplay 'no-update))
- ((derived-mode-p 'sx-question-mode)
- (sx-question-mode-refresh 'no-update)))))
+ (with-current-buffer buffer
+ (cond ((derived-mode-p 'sx-question-list-mode)
+ (sx-question-list-refresh 'redisplay 'no-update))
+ ((derived-mode-p 'sx-question-mode)
+ (sx-question-mode-refresh 'no-update))))))
(defun sx--copy-data (from to)
"Copy all fields of alist FORM onto TO.