diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index 4d8520d7436..f42219cae94 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -559,7 +559,7 @@ select_window_1 (Lisp_Object window, bool inhibit_point_swap) | |||
| 559 | DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0, | 559 | DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0, |
| 560 | doc: /* Select WINDOW which must be a live window. | 560 | doc: /* Select WINDOW which must be a live window. |
| 561 | Also make WINDOW's frame the selected frame and WINDOW that frame's | 561 | Also make WINDOW's frame the selected frame and WINDOW that frame's |
| 562 | selected window. In addition, make WINDOW's buffer current and set that | 562 | selected window. In addition, make WINDOW's buffer current and set its |
| 563 | buffer's value of `point' to the value of WINDOW's `window-point'. | 563 | buffer's value of `point' to the value of WINDOW's `window-point'. |
| 564 | Return WINDOW. | 564 | Return WINDOW. |
| 565 | 565 | ||
| @@ -567,8 +567,17 @@ Optional second arg NORECORD non-nil means do not put this buffer at the | |||
| 567 | front of the buffer list and do not make this window the most recently | 567 | front of the buffer list and do not make this window the most recently |
| 568 | selected one. | 568 | selected one. |
| 569 | 569 | ||
| 570 | Note that the main editor command loop sets the current buffer to the | 570 | Run `buffer-list-update-hook' unless NORECORD is non-nil. Note that |
| 571 | buffer of the selected window before each command. */) | 571 | applications and internal routines often select a window temporarily for |
| 572 | various purposes; mostly, to simplify coding. As a rule, such | ||
| 573 | selections should be not recorded and therefore will not pollute | ||
| 574 | `buffer-list-update-hook'. Selections that "really count" are those | ||
| 575 | causing a visible change in the next redisplay of WINDOW's frame and | ||
| 576 | should be always recorded. So if you think of running a function each | ||
| 577 | time a window gets selected put it on `buffer-list-update-hook'. | ||
| 578 | |||
| 579 | Also note that the main editor command loop sets the current buffer to | ||
| 580 | the buffer of the selected window before each command. */) | ||
| 572 | (register Lisp_Object window, Lisp_Object norecord) | 581 | (register Lisp_Object window, Lisp_Object norecord) |
| 573 | { | 582 | { |
| 574 | return select_window (window, norecord, 0); | 583 | return select_window (window, norecord, 0); |