diff --git a/lisp/window.el b/lisp/window.el index 29e7310958b..cdc6f690bab 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -10867,7 +10867,8 @@ Remember the returned context in the window parameter `context'." (window-buffer w))) ((functionp fn)) (context (funcall fn w))) - (set-window-parameter w 'context (cons (buffer-name) context)))) + (set-window-parameter + w 'context (cons (buffer-name (window-buffer w)) context)))) 'nomini)) (defun window-point-context-use () @@ -10885,7 +10886,7 @@ found by the provided context." (window-buffer w))) ((functionp fn)) (context (window-parameter w 'context)) - ((equal (buffer-name) (car context)))) + ((equal (buffer-name (window-buffer w)) (car context)))) (funcall fn w (cdr context)) (set-window-parameter w 'context nil))) 'nomini))