diff options
| author | Martin Rudalics | 2014-03-07 16:11:12 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2014-03-07 16:11:12 +0100 |
| commit | 2c6053e8387ca3d60dcc82e702f5a113ce5fb59f (patch) | |
| tree | 611bdf5c7479e306dbbf46ce7740d64bdcf022ff /src/window.c | |
| parent | 84254bbdf069f0386f188d0e2bc5be795a9272bb (diff) | |
| download | emacs-2c6053e8387ca3d60dcc82e702f5a113ce5fb59f.tar.gz emacs-2c6053e8387ca3d60dcc82e702f5a113ce5fb59f.zip | |
Update docs for select-window and buffer-list-update-hook.
* buffer.c (Vbuffer_list_update_hook): Doc-string fix.
* window.c (Fselect_window): Explain NORECORD and
`buffer-list-update-hook' in doc-string.
* buffers.texi (The Buffer List): Rename node to Buffer List.
Describe `buffer-list-update-hook'.
* elisp.texi (Top): "The Buffer List" renamed to "Buffer List".
Add node for Window Dividers.
* hooks.texi (Standard Hooks): Add reference to
`buffer-list-update-hook'.
* windows.texi (Selecting Windows): Update description of
`select-window'.
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); |