Function: mh-quit

mh-quit is an autoloaded, interactive and byte-compiled function defined in mh-folder.el.gz.

Signature

(mh-quit)

Documentation

Quit the current MH-E folder.

When you want to quit using MH-E and go back to editing, you can use this command. This buries the buffers of the current MH-E folder and restores the buffers that were present when you first ran M-x mh-rmail (mh-rmail). It also removes any MH-E working buffers whose name begins with " *mh-" or "*MH-E ". You can later restore your MH-E session by selecting the "+inbox" buffer or by running M-x mh-rmail (mh-rmail) again.

The two hooks mh-before-quit-hook and mh-quit-hook are called by this function. The former one is called before the quit occurs, so you might use it to perform any MH-E operations; you could perform some query and abort the quit or call mh-execute-commands, for example. The latter is not run in an MH-E context, so you might use it to modify the window setup.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-folder.el.gz
;;;###mh-autoload
(defun mh-quit ()
  "Quit the current MH-E folder.

When you want to quit using MH-E and go back to editing, you can use
this command. This buries the buffers of the current MH-E folder and
restores the buffers that were present when you first ran
\\[mh-rmail]. It also removes any MH-E working buffers whose name
begins with \" *mh-\" or \"*MH-E \". You can later restore your MH-E
session by selecting the \"+inbox\" buffer or by running \\[mh-rmail]
again.

The two hooks `mh-before-quit-hook' and `mh-quit-hook' are called by
this function. The former one is called before the quit occurs, so you
might use it to perform any MH-E operations; you could perform some
query and abort the quit or call `mh-execute-commands', for example.
The latter is not run in an MH-E context, so you might use it to
modify the window setup."
  (interactive)
  (run-hooks 'mh-before-quit-hook)
  (let ((show-buffer (get-buffer mh-show-buffer)))
    (when show-buffer
      (kill-buffer show-buffer)))
  (mh-update-sequences)
  (mh-destroy-postponed-handles)
  (bury-buffer (current-buffer))

  ;; Delete all MH-E temporary and working buffers.
  (dolist (buffer (buffer-list))
    (when (or (string-match "^ \\*mh-" (buffer-name buffer))
              (string-match "^\\*MH-E " (buffer-name buffer)))
      (kill-buffer buffer)))

  (if mh-previous-window-config
      (set-window-configuration mh-previous-window-config))
  (run-hooks 'mh-quit-hook))