diff options
| author | Bill Wohler | 2006-04-18 00:03:18 +0000 |
|---|---|---|
| committer | Bill Wohler | 2006-04-18 00:03:18 +0000 |
| commit | b2853b3c5a453f8b927b59dd478d4c64bb98e147 (patch) | |
| tree | cd610a23955d4e385e4351d43e2c6b496bf28f24 | |
| parent | cd35b20a6fe3ff2c3620181481ba5585f633de62 (diff) | |
| download | emacs-b2853b3c5a453f8b927b59dd478d4c64bb98e147.tar.gz emacs-b2853b3c5a453f8b927b59dd478d4c64bb98e147.zip | |
(Folders): Updated mh-before-quit-hook and mh-quit-hook example with
code that removes the buffers rather than just bury them.
| -rw-r--r-- | man/ChangeLog | 6 | ||||
| -rw-r--r-- | man/mh-e.texi | 39 |
2 files changed, 27 insertions, 18 deletions
diff --git a/man/ChangeLog b/man/ChangeLog index e3d1899643a..a37d6fab7f8 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-04-17 Bill Wohler <wohler@newt.com> | ||
| 2 | |||
| 3 | * mh-e.texi (Folders): Updated mh-before-quit-hook and | ||
| 4 | mh-quit-hook example with code that removes the buffers rather | ||
| 5 | than just bury them. | ||
| 6 | |||
| 1 | 2006-04-18 Nick Roberts <nickrob@snap.net.nz> | 7 | 2006-04-18 Nick Roberts <nickrob@snap.net.nz> |
| 2 | 8 | ||
| 3 | * building.texi (Watch Expressions): Update. | 9 | * building.texi (Watch Expressions): Update. |
diff --git a/man/mh-e.texi b/man/mh-e.texi index 956bad07859..d8245b325ab 100644 --- a/man/mh-e.texi +++ b/man/mh-e.texi | |||
| @@ -11,8 +11,8 @@ | |||
| 11 | @set VERSION 7.93 | 11 | @set VERSION 7.93 |
| 12 | @c Edition of the manual. It is either empty for the first edition or | 12 | @c Edition of the manual. It is either empty for the first edition or |
| 13 | @c has the form ", nth Edition" (without the quotes). | 13 | @c has the form ", nth Edition" (without the quotes). |
| 14 | @set EDITION , 6th Edition | 14 | @set EDITION , 7th Edition |
| 15 | @set UPDATED 2006-04-02 | 15 | @set UPDATED 2006-04-17 |
| 16 | @set UPDATE-MONTH April, 2006 | 16 | @set UPDATE-MONTH April, 2006 |
| 17 | 17 | ||
| 18 | @c Other variables. | 18 | @c Other variables. |
| @@ -3724,33 +3724,36 @@ again. | |||
| 3724 | @findex mh-execute-commands | 3724 | @findex mh-execute-commands |
| 3725 | @kindex q | 3725 | @kindex q |
| 3726 | @vindex mh-before-quit-hook | 3726 | @vindex mh-before-quit-hook |
| 3727 | @vindex mh-before-quit-hook, example | ||
| 3727 | @vindex mh-quit-hook | 3728 | @vindex mh-quit-hook |
| 3729 | @vindex mh-quit-hook, example | ||
| 3728 | 3730 | ||
| 3729 | The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are | 3731 | The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are |
| 3730 | called by @kbd{q}. The former one is called before the quit occurs, so | 3732 | called by @kbd{q}. The former one is called before the quit occurs, so |
| 3731 | you might use it to perform any MH-E operations; you could perform | 3733 | you might use it to perform any MH-E operations; you could perform |
| 3732 | some query and abort the quit or call @code{mh-execute-commands}, for | 3734 | some query and abort the quit or call @code{mh-execute-commands}, for |
| 3733 | example. The latter is not run in an MH-E context, so you might use it | 3735 | example. The latter is not run in an MH-E context, so you might use it |
| 3734 | to modify the window setup. For example, if the window configuration | 3736 | to modify the window setup. If you find that @kbd{q} buries a lot of |
| 3735 | was saved as in the example in @ref{Miscellaneous Commands and | 3737 | buffers that you would rather remove, you can use both |
| 3736 | Options}, you would also want to set @code{mh-quit-hook} to the | 3738 | @code{mh-before-quit-hook} and @code{mh-quit-hook} to accomplish that. |
| 3737 | following: | ||
| 3738 | |||
| 3739 | @c XXX Replace this with my example for killing the mail buffers. | ||
| 3740 | |||
| 3741 | @vindex mh-quit-hook, example | ||
| 3742 | 3739 | ||
| 3743 | @smalllisp | 3740 | @smalllisp |
| 3744 | @group | 3741 | @group |
| 3742 | (defvar my-mh-folder-buffer-to-delete nil | ||
| 3743 | "Folder buffer that is being quit.") | ||
| 3744 | |||
| 3745 | (defun my-mh-before-quit-hook () | ||
| 3746 | "Save folder buffer that is to be deleted." | ||
| 3747 | (setq my-mh-folder-buffer-to-delete (current-buffer))) | ||
| 3748 | |||
| 3745 | (defun my-mh-quit-hook () | 3749 | (defun my-mh-quit-hook () |
| 3746 | "Clear window configuration variables as the MH window is gone." | 3750 | "Kill folder buffer rather than just bury it." |
| 3747 | (setq my-mh-screen-saved nil) | 3751 | (set-buffer my-mh-folder-buffer-to-delete) |
| 3748 | (setq my-mh-screen nil) | 3752 | (if (get-buffer mh-show-buffer) |
| 3749 | (if my-normal-screen | 3753 | (kill-buffer mh-show-buffer)) |
| 3750 | (set-window-configuration my-normal-screen)) | 3754 | (kill-buffer (current-buffer))) |
| 3751 | (setq my-normal-screen nil)) | 3755 | |
| 3752 | 3756 | @i{Kill MH-Folder buffer instead of burying it} | |
| 3753 | @i{Clean up window setup in mh-quit-hook} | ||
| 3754 | @end group | 3757 | @end group |
| 3755 | @end smalllisp | 3758 | @end smalllisp |
| 3756 | 3759 | ||