Function: mh-kill-folder
mh-kill-folder is an autoloaded, interactive and byte-compiled
function defined in mh-funcs.el.gz.
Signature
(mh-kill-folder)
Documentation
Remove folder.
Remove all of the messages (files) within the current folder, and then remove the folder (directory) itself.
Run the abnormal hook mh-kill-folder-suppress-prompt-functions.
The hook functions are called with no arguments and should return
a non-nil value to suppress the normal prompt when you remove a
folder. This is useful for folders that are easily regenerated.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-funcs.el.gz
;;;###mh-autoload
(defun mh-kill-folder ()
"Remove folder.
Remove all of the messages (files) within the current folder, and
then remove the folder (directory) itself.
Run the abnormal hook `mh-kill-folder-suppress-prompt-functions'.
The hook functions are called with no arguments and should return
a non-nil value to suppress the normal prompt when you remove a
folder. This is useful for folders that are easily regenerated."
(interactive)
(if (or (run-hook-with-args-until-success
'mh-kill-folder-suppress-prompt-functions)
(yes-or-no-p (format "Remove folder %s (and all included messages)? "
mh-current-folder)))
(let ((folder mh-current-folder)
(window-config mh-previous-window-config))
(mh-set-folder-modified-p t) ; lock folder to kill it
(mh-exec-cmd-daemon "rmf" 'mh-rmf-daemon folder)
(when (and (boundp 'speedbar-buffer) speedbar-buffer)
(mh-speed-invalidate-map folder))
(mh-remove-from-sub-folders-cache folder)
(mh-set-folder-modified-p nil) ; so kill-buffer doesn't complain
(if (and mh-show-buffer (get-buffer mh-show-buffer))
(kill-buffer mh-show-buffer))
(if (get-buffer folder)
(kill-buffer folder))
(when window-config
(set-window-configuration window-config))
(message "Folder %s removed" folder))
(message "Folder not removed")))