From: Juri Linkov Date: Tue, 9 Apr 2024 06:43:55 +0000 (+0300) Subject: Fix window-point-context-set and window-point-context-use (bug#33871) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dca48f0460f1f0cfc280635ece3443f7e434f695;p=emacs.git Fix window-point-context-set and window-point-context-use (bug#33871) * lisp/window.el (window-point-context-set) (window-point-context-use): Add 'window-buffer' for 'buffer-name'. (cherry picked from commit b31f7e67de52c276dd1bcb6fbd048ef12435a327) --- diff --git a/lisp/window.el b/lisp/window.el index ee6085afa9f..f4cb2a44dfa 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -10883,7 +10883,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 () @@ -10901,7 +10902,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))