comparison man/mh-e.texi @ 70060:f59d014a5333

(Folders): Updated mh-before-quit-hook and mh-quit-hook example with code that removes the buffers rather than just bury them.
author Bill Wohler <wohler@newt.com>
date Tue, 18 Apr 2006 00:03:18 +0000
parents 751ecb169488
children 92dfa83b08e5 2d2f6f096f6e 72dea2ff0142
comparison
equal deleted inserted replaced
70059:9028ccec5e38 70060:f59d014a5333
9 9
10 @c Version of the software and manual. 10 @c Version of the software and manual.
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.
19 @set MH-BOOK-HOME http://www.ics.uci.edu/~mh/book/mh 19 @set MH-BOOK-HOME http://www.ics.uci.edu/~mh/book/mh
20 @set MH-E-HOME http://mh-e.sourceforge.net/ 20 @set MH-E-HOME http://mh-e.sourceforge.net/
3722 again. 3722 again.
3723 3723
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
3757 @cindex folders, renaming 3760 @cindex folders, renaming
3758 @cindex renaming folders 3761 @cindex renaming folders