bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45688: 28.0.50; New action for display-buffer?


From: martin rudalics
Subject: bug#45688: 28.0.50; New action for display-buffer?
Date: Wed, 6 Jan 2021 19:47:55 +0100

>> I was curious how XEmacs did this command, so I installed XEmacs.  If
>> there's two (or one) window, the command works the same in Emacs and
>> XEmacs, but it's interesting what XEmacs does when there's more than two
>> windows: It cycles the windows.
>
> This is how Emacs already works - exactly as XEmacs
> it uses get-lru-window that caused a lot of sadness
> for many years.  Many times I asked to fix this to
> use get-mru-window instead.  Maybe now is a good moment to
> finally change this to work differently from XEmacs.

Emacs doesn't work like XEmacs here.  When XEmacs has found a window to
display the buffer in, it does

              ;; Bring the window's previous buffer to the top of the
              ;; MRU chain.
              (if (window-buffer window)
                  (save-excursion
                    (save-selected-window
                      (select-window window)
                      (record-buffer (window-buffer window)))))

which selects the window and, as a side effect, updates its use time.
Which makes that window less likely for `display-buffer' to be used
again.

martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]