diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-09-21 18:54:41 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-09-21 18:54:41 +0200 |
commit | aaf4bb1f07c4d98e6390f90636848c5d46aa6162 (patch) | |
tree | 2fdae2c45ebda63b4399d7a7016ab2fe96b6fb1f /lisp/whitespace.el | |
parent | 6f360c5aad7558e0404454783b9dd902e46c034e (diff) | |
download | emacs-aaf4bb1f07c4d98e6390f90636848c5d46aa6162.tar.gz |
Restore some of the previous behaviour in whitespace-display-window
* lisp/whitespace.el (whitespace-display-window): Emulate previous
behaviour (bug#50716). Code from martin rudalics <rudalics@gmx.at>.
Diffstat (limited to 'lisp/whitespace.el')
-rw-r--r-- | lisp/whitespace.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/whitespace.el b/lisp/whitespace.el index adf553938e4..59d3249c5de 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -1836,12 +1836,13 @@ cleaning up these problems." (defun whitespace-display-window (buffer) - "Display BUFFER in a new window." (goto-char (point-min)) (set-buffer-modified-p nil) - (pop-to-buffer buffer) - (shrink-window-if-larger-than-buffer)) - + (let ((window (display-buffer + buffer + `((display-buffer-reuse-window + display-buffer-below-selected))))) + (shrink-window-if-larger-than-buffer window))) (defun whitespace-kill-buffer (buffer-name) "Kill buffer BUFFER-NAME and windows related with it." |