diff options
| author | Richard M. Stallman | 1994-05-18 06:04:03 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-18 06:04:03 +0000 |
| commit | e944d8f19bdb2d02deff4ec442187b3305a29e34 (patch) | |
| tree | f37df26ea07f794fad8d10a76b0e1f7b30ccbe6d | |
| parent | 83dcaada849b9882caacdc96204f6c04d787d9b7 (diff) | |
| download | emacs-e944d8f19bdb2d02deff4ec442187b3305a29e34.tar.gz emacs-e944d8f19bdb2d02deff4ec442187b3305a29e34.zip | |
*** empty log message ***
| -rw-r--r-- | lispref/buffers.texi | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/lispref/buffers.texi b/lispref/buffers.texi index 6f777d7480c..4aeb8a5487c 100644 --- a/lispref/buffers.texi +++ b/lispref/buffers.texi | |||
| @@ -672,22 +672,6 @@ It does this even if not called interactively. To prevent the request | |||
| 672 | for confirmation, clear the modified flag before calling | 672 | for confirmation, clear the modified flag before calling |
| 673 | @code{kill-buffer}. @xref{Buffer Modification}. | 673 | @code{kill-buffer}. @xref{Buffer Modification}. |
| 674 | 674 | ||
| 675 | @vindex kill-buffer-query-functions | ||
| 676 | You can program additional requests for confirmation. After confirming | ||
| 677 | unsaved changes, @code{kill-buffer} calls the functions in the list | ||
| 678 | @code{kill-buffer-query-functions}, in order of appearance, with no | ||
| 679 | arguments. The buffer being killed is the current buffer when they are | ||
| 680 | called. The idea is that these functions ask for confirmation from the | ||
| 681 | user for various nonstandard reasons. If any of them returns | ||
| 682 | non-@code{nil}, the buffer is not killed. | ||
| 683 | |||
| 684 | @c Emacs 19 feature | ||
| 685 | @vindex kill-buffer-hook | ||
| 686 | Just before actually killing the buffer, after asking all questions, | ||
| 687 | @code{kill-buffer} runs the normal hook @code{kill-buffer-hook}. The | ||
| 688 | buffer to be killed is current when the hook functions run. | ||
| 689 | @xref{Hooks}. | ||
| 690 | |||
| 691 | Killing a buffer that is already dead has no effect. | 675 | Killing a buffer that is already dead has no effect. |
| 692 | 676 | ||
| 693 | @smallexample | 677 | @smallexample |
| @@ -703,6 +687,30 @@ Buffer foo.changed modified; kill anyway? (yes or no) @kbd{yes} | |||
| 703 | @end smallexample | 687 | @end smallexample |
| 704 | @end deffn | 688 | @end deffn |
| 705 | 689 | ||
| 690 | @defvar kill-buffer-query-functions | ||
| 691 | After confirming unsaved changes, @code{kill-buffer} calls the functions | ||
| 692 | in the list @code{kill-buffer-query-functions}, in order of appearance, | ||
| 693 | with no arguments. The buffer being killed is the current buffer when | ||
| 694 | they are called. The idea is that these functions ask for confirmation | ||
| 695 | from the user for various nonstandard reasons. If any of them returns | ||
| 696 | non-@code{nil}, @code{kill-buffer} spares the buffer's life. | ||
| 697 | @end defvar | ||
| 698 | |||
| 699 | @defvar kill-buffer-hook | ||
| 700 | This is a normal hook run by @code{kill-buffer} after asking all the | ||
| 701 | questions it is going to ask, just before actually killing the buffer. | ||
| 702 | The buffer to be killed is current when the hook functions run. | ||
| 703 | @xref{Hooks}. | ||
| 704 | @end defvar | ||
| 705 | |||
| 706 | @defvar buffer-offer-save | ||
| 707 | This variable, if non-@code{nil} in a particular buffer, tells | ||
| 708 | @code{save-buffers-kill-emacs} and @code{save-some-buffers} to offer to | ||
| 709 | save that buffer, just as they offer to save file-visiting buffers. The | ||
| 710 | variable @code{buffer-offer-save} automatically becomes buffer-local | ||
| 711 | when set for any reason. @xref{Buffer-Local Variables}. | ||
| 712 | @end defvar | ||
| 713 | |||
| 706 | @node Current Buffer | 714 | @node Current Buffer |
| 707 | @section The Current Buffer | 715 | @section The Current Buffer |
| 708 | @cindex selecting a buffer | 716 | @cindex selecting a buffer |