1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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
This commit is contained in:
Juri Linkov 2020-06-25 03:48:32 +03:00
parent b6ea0e0834
commit 7d6b860245

View file

@ -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)