diff options
| author | Lars Ingebrigtsen | 2021-01-07 16:35:48 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-01-07 16:35:48 +0100 |
| commit | 40a0f8a3a2ac790bb398c321e7eb6928da330511 (patch) | |
| tree | f3afec5a6136ff483ca3c6e7e1427b2c2757eb6d /src | |
| parent | 0e6b74d2047452bb1fc3285921465132aeda0cb7 (diff) | |
| download | emacs-40a0f8a3a2ac790bb398c321e7eb6928da330511.tar.gz emacs-40a0f8a3a2ac790bb398c321e7eb6928da330511.zip | |
Add a display-buffer window selection function that's more like XEmacs
* doc/lispref/windows.texi (Buffer Display Action Functions):
Document it.
* lisp/window.el (display-buffer--action-function-custom-type): Add.
(display-buffer): Mention it.
(display-buffer-use-least-recent-window): New function (bug#45688).
* src/window.c (Fwindow_bump_use_time): New function.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index 58204c13e44..5e78aa400b5 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -8100,6 +8100,18 @@ and scrolling positions. */) | |||
| 8100 | return Qt; | 8100 | return Qt; |
| 8101 | return Qnil; | 8101 | return Qnil; |
| 8102 | } | 8102 | } |
| 8103 | |||
| 8104 | DEFUN ("window-bump-use-time", Fwindow_bump_use_time, | ||
| 8105 | Swindow_bump_use_time, 1, 1, 0, | ||
| 8106 | doc: /* Mark WINDOW as having been recently used. */) | ||
| 8107 | (Lisp_Object window) | ||
| 8108 | { | ||
| 8109 | struct window *w = decode_valid_window (window); | ||
| 8110 | |||
| 8111 | w->use_time = ++window_select_count; | ||
| 8112 | return Qnil; | ||
| 8113 | } | ||
| 8114 | |||
| 8103 | 8115 | ||
| 8104 | 8116 | ||
| 8105 | static void init_window_once_for_pdumper (void); | 8117 | static void init_window_once_for_pdumper (void); |
| @@ -8573,6 +8585,7 @@ displayed after a scrolling operation to be somewhat inaccurate. */); | |||
| 8573 | defsubr (&Swindow_vscroll); | 8585 | defsubr (&Swindow_vscroll); |
| 8574 | defsubr (&Sset_window_vscroll); | 8586 | defsubr (&Sset_window_vscroll); |
| 8575 | defsubr (&Scompare_window_configurations); | 8587 | defsubr (&Scompare_window_configurations); |
| 8588 | defsubr (&Swindow_bump_use_time); | ||
| 8576 | defsubr (&Swindow_list); | 8589 | defsubr (&Swindow_list); |
| 8577 | defsubr (&Swindow_list_1); | 8590 | defsubr (&Swindow_list_1); |
| 8578 | defsubr (&Swindow_prev_buffers); | 8591 | defsubr (&Swindow_prev_buffers); |