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 | |
| 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')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/buffer.c | 4 | ||||
| -rw-r--r-- | src/window.c | 15 |
3 files changed, 20 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9fef63c9a58..6d1285a82da 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-03-07 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * buffer.c (Vbuffer_list_update_hook): Doc-string fix. | ||
| 4 | * window.c (Fselect_window): Explain NORECORD and | ||
| 5 | `buffer-list-update-hook' in doc-string. | ||
| 6 | |||
| 1 | 2014-03-06 Martin Rudalics <rudalics@gmx.at> | 7 | 2014-03-06 Martin Rudalics <rudalics@gmx.at> |
| 2 | 8 | ||
| 3 | * window.c (Fother_window_for_scrolling): Check that | 9 | * window.c (Fother_window_for_scrolling): Check that |
diff --git a/src/buffer.c b/src/buffer.c index 90c15420d1d..028ef76ff71 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -6284,9 +6284,9 @@ The function `kill-all-local-variables' runs this before doing anything else. * | |||
| 6284 | 6284 | ||
| 6285 | DEFVAR_LISP ("buffer-list-update-hook", Vbuffer_list_update_hook, | 6285 | DEFVAR_LISP ("buffer-list-update-hook", Vbuffer_list_update_hook, |
| 6286 | doc: /* Hook run when the buffer list changes. | 6286 | doc: /* Hook run when the buffer list changes. |
| 6287 | Functions running this hook are `get-buffer-create', | 6287 | Functions running this hook are, `get-buffer-create', |
| 6288 | `make-indirect-buffer', `rename-buffer', `kill-buffer', | 6288 | `make-indirect-buffer', `rename-buffer', `kill-buffer', |
| 6289 | and `bury-buffer-internal'. */); | 6289 | `bury-buffer-internal' and `select-window'. */); |
| 6290 | Vbuffer_list_update_hook = Qnil; | 6290 | Vbuffer_list_update_hook = Qnil; |
| 6291 | DEFSYM (Qbuffer_list_update_hook, "buffer-list-update-hook"); | 6291 | DEFSYM (Qbuffer_list_update_hook, "buffer-list-update-hook"); |
| 6292 | 6292 | ||
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); |