From: Juri Linkov Date: Thu, 25 Jun 2020 00:48:32 +0000 (+0300) Subject: Push action to list of functions in display-buffer-override-next-command X-Git-Tag: emacs-28.0.90~7101 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7d6b860245acef3c546161169e34f24e93e8066e;p=emacs.git Push action to list of functions in display-buffer-override-next-command * lisp/window.el (display-buffer-override-next-command): Push action to 'car' of 'display-buffer-overriding-action' and in exitfun remove action from 'car'. https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00803.html --- diff --git a/lisp/window.el b/lisp/window.el index a84ca05daac..d499f9ab99a 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8643,8 +8643,8 @@ window; the function takes two arguments: an old and new window." (command this-command) (exitfun (lambda () - (setq display-buffer-overriding-action - (delq action display-buffer-overriding-action)) + (setcar display-buffer-overriding-action + (delq action (car display-buffer-overriding-action))) (remove-hook 'post-command-hook clearfun) (when (functionp post-function) (funcall post-function old-window new-window))))) @@ -8661,7 +8661,7 @@ window; the function takes two arguments: an old and new window." ;; Reset display-buffer-overriding-action ;; after the next command finishes (add-hook 'post-command-hook clearfun) - (push action display-buffer-overriding-action))) + (push action (car display-buffer-overriding-action)))) (defun set-window-text-height (window height)