;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:47:46 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/mail/mh-funcs.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`mh-funcs.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\302\303!\207" [provide mh-funcs require mh-e] 2)
#@296 Extra arguments to have \[mh-sort-folder] pass to the "sortm" command.
The arguments are passed to sortm if \[mh-sort-folder] is given a
prefix argument.  Normally default arguments to sortm are specified in the
MH profile.
For example, '("-nolimit" "-textfield" "subject") is a useful setting.
(defvar mh-sortm-args nil (#$ . 699))
#@65 String whose first character is used to notate copied messages.
(defvar mh-note-copied "C" (#$ . 1038))
#@66 String whose first character is used to notate printed messages.
(defvar mh-note-printed "P" (#$ . 1148))
#@191 Burst apart the current message, which should be a digest.
The message is replaced by its table of contents and the messages from the
digest are inserted into the folder after that message.
(defalias 'mh-burst-digest #[nil "\305\306!\307	!\210\310\306!\210\311\312!\210\313\314	\315$\210\316 \317\211\320 \210`d|\210\310\f!\210+\321\322\323\"\306\"\210\324 \210\311\325!)\207" [digest mh-current-folder buffer-file-name buffer-read-only mh-folder-updating-mod-flag mh-get-msg-num t mh-process-or-undo-commands mh-set-folder-modified-p message "Bursting digest..." mh-exec-cmd "burst" "-inplace" buffer-modified-p nil beginning-of-line mh-regenerate-headers format "%d-last" mh-goto-cur-msg "Bursting digest...done"] 5 (#$ . 1261) nil])
#@186 Copy the specified MESSAGE(s) to another FOLDER without deleting them.
Default is the displayed message.  If optional prefix argument is
provided, then prompt for the message sequence.
(defalias 'mh-copy-msg #[(msg-or-seq folder) "\305\306\307\310	\n&\210\247\203 \311\f#\207\312\f#\207" [msg-or-seq mh-current-folder folder mh-note-copied mh-cmd-note mh-exec-cmd "refile" "-link" "-src" mh-notate mh-notate-seq] 7 (#$ . 2010) (list (if current-prefix-arg (mh-read-seq-default "Copy" t) (mh-get-msg-num t)) (mh-prompt-for-folder "Copy to" "" t))])
#@28 Remove the current folder.
(defalias 'mh-kill-folder #[nil "\204 \305\306\307	\"!\203C 	\204 \310 \210\311\312!\210\313\314\n\"\210\315\316\n\"\"\317\320!\210\321\322\n\"\210\311\323!\210\324\f!\203> \325\f!\210\325\n!)\207\321\326!\207" [mh-do-not-confirm mh-current-folder folder mh-folder-list mh-show-buffer yes-or-no-p format "Remove folder %s? " mh-set-folder-list mh-set-folder-modified-p t mh-exec-cmd-daemon "rmf" delq assoc run-hooks mh-folder-list-change-hook message "Folder %s removed" nil get-buffer kill-buffer "Folder not removed"] 4 (#$ . 2572) nil])
#@20 List mail folders.
(defalias 'mh-list-folders #[nil "\220\212\302!\210\303 \210\304\305!\210\306\307\310	\203 \311\202 \312#\210eb\210\304\313!)\221\207" [mh-temp-buffer mh-recursive-folders switch-to-buffer erase-buffer message "Listing folders..." mh-exec-cmd-output "folders" t "-recurse" "-norecurse" "Listing folders...done"] 5 (#$ . 3154) nil])
#@253 Renumber the messages of a folder to be 1..n.
First, offer to execute any outstanding commands for the current folder.
If optional prefix argument provided, prompt for the RANGE of messages
to display after packing.  Otherwise, show the entire folder.
(defalias 'mh-pack-folder #[(range) "\301!\210\302 \210\303\304!\207" [range mh-pack-folder-1 mh-goto-cur-msg message "Packing folder...done"] 2 (#$ . 3516) (list (if current-prefix-arg (mh-read-msg-range "Range to scan after packing [all]? ") "all"))])
(defalias 'mh-pack-folder-1 #[(range) "\302!\210\303\304!\210\305\306!\210\212\307\306\310\311\312\313&\210)\314	!\207" [mh-current-folder range mh-process-or-undo-commands message "Packing folder..." mh-set-folder-modified-p t mh-exec-cmd-quiet "folder" "-pack" "-norecurse" "-fast" mh-regenerate-headers] 7])
#@194 Pipe the current message through the given shell COMMAND.
If INCLUDE-HEADERS (prefix argument) is provided, send the entire message.
Otherwise just send the message's body without the headers.
(defalias 'mh-pipe-msg #[(command include-headers) "\306\307\310!!\212\311!q\210\312 \210\313\n!\210eb\210\f\204  \314\315!\210	\316`d\317$,\207" [default-directory message-directory msg-file-to-pipe mh-temp-buffer include-headers command mh-msg-filename mh-get-msg-num t get-buffer-create erase-buffer insert-file-contents search-forward "\n\n" shell-command-on-region nil] 5 (#$ . 4344) (list (read-string "Shell command on message: ") current-prefix-arg)])
#@53 Advance displayed message to next digested message.
(defalias 'mh-page-digest #[nil "\304 \305	!\210\n\203 \306p!\210\307\216\310\311!\210\312\313\314\312\315#\203' \316\317\312\315#\204+ \320\321!\210)\322\314\312\315#\210\323y\210\324\311!*\207" [mh-in-show-buffer-saved-window mh-show-buffer mh-bury-show-buffer case-fold-search selected-window switch-to-buffer-other-window bury-buffer ((select-window mh-in-show-buffer-saved-window)) move-to-window-line 0 nil search-forward "\n\n" t re-search-forward "^From:" error "No more messages in digest" search-backward 2 mh-recenter] 4 (#$ . 5009) nil])
#@57 Back up displayed message to previous digested message.
(defalias 'mh-page-digest-backwards #[nil "\304 \305	!\210\n\203 \306p!\210\307\216\310\311!\210\312\313 \210\314\315\312\316#\203* \317\320\312\316#\204. \321\322!\210)\314\315\312\316#\203: \323y\210\324\311!*\207" [mh-in-show-buffer-saved-window mh-show-buffer mh-bury-show-buffer case-fold-search selected-window switch-to-buffer-other-window bury-buffer ((select-window mh-in-show-buffer-saved-window)) move-to-window-line 0 nil beginning-of-line search-backward "\n\n" t re-search-backward "^From:" error "No previous message in digest" 2 mh-recenter] 4 (#$ . 5620) nil])
#@276 Print MESSAGE(s) (default: displayed message) on printer.
If optional prefix argument provided, then prompt for the message sequence.
The variable mh-lpr-command-format is used to generate the print command.
The messages are formatted by mhl.  See the variable mhl-formfile.
(defalias 'mh-print-msg #[(msg-or-seq) "\247\203\f \306\307!\210\202 \306\310!\210\247\203C \311\312\313\314	\"\315!\n;\203* \311\316\n\"\202+ \317\311\247\203: \311\320\f#\202> \311\321\f\"\"%\202t \311\322\323\324\325#\313\314	\"\n;\203Z \311\316\n\"\202[ \317\326!\311\247\203m \311\320\f#\202q \311\321\f\"\"&\"\203\204 \327#\330#\210\202\217 \331#\332\211\211\330&\210\247\203\237 \333$%#\210\202\247 \334$%#\210\335\336\337#\210\247\203\270 \306\340!\202\273 \306\341!)\207" [msg-or-seq mh-lib mhl-formfile mh-lpr-command-format mh-current-folder print-command message "Printing message..." "Printing sequence..." format "%s -nobell -clear %s %s | %s" expand-file-name "mhl" mh-msg-filename "-form %s" "" "%s/%d" "Sequence from %s" "(scan -clear %s ; %s -nobell -clear %s %s) | %s" mapconcat #[(msg) "\207" [msg] 1] " " mh-msg-filenames mh-exec-cmd-daemon "-c" call-process nil mh-notate mh-notate-seq mh-add-msgs-to-seq printed t "Printing message...done" "Printing sequence...done" mh-print-background shell-file-name mh-note-printed mh-cmd-note] 12 (#$ . 6264) (list (if current-prefix-arg (reverse (mh-seq-to-msgs (mh-read-seq-default "Print" t))) (mh-get-msg-num t)))])
(defalias 'mh-msg-filenames #[(msgs &optional folder) "\301\302\303#\207" [msgs mapconcat #[(msg) "\302	\"\207" [msg folder mh-msg-filename] 3] " "] 4])
#@195 Sort the messages in the current folder by date.
Calls the MH program sortm to do the work.
The arguments in the list  mh-sortm-args  are passed to sortm
if this function is passed an argument.
(defalias 'mh-sort-folder #[(&optional extra-args) "\304!\210\305\306\307!\210\310\311!\210\312\313\n\205 #\210\310\314!\210\315\316\"\207" [mh-current-folder mh-next-direction extra-args mh-sortm-args mh-process-or-undo-commands forward mh-set-folder-modified-p t message "Sorting folder..." mh-exec-cmd "sortm" "Sorting folder...done" mh-scan-folder "all"] 4 (#$ . 7912) "P"])
#@57 Undo all pending deletes and refiles in current folder.
(defalias 'mh-undo-folder #[(&rest ignore) "\204\n \306\307!\203) \310\310\310\311\312 \310\211\313\314!\315!\210+\315\310!\210\207\316\317!\210\320\321!\207" [mh-do-not-confirm mh-delete-list mh-refile-list mh-seq-list mh-next-direction buffer-file-name yes-or-no-p "Undo all commands in folder? " nil forward buffer-modified-p mh-unmark-all-headers t mh-set-folder-modified-p message "Commands not undone." sit-for 2 buffer-read-only mh-folder-updating-mod-flag] 3 (#$ . 8497) nil])
#@249 Store the file(s) contained in the current message into DIRECTORY.
The message can contain a shar file or uuencoded file.
Default directory is the last directory used, or initially the value of
mh-store-default-directory  or the current directory.
(defalias 'mh-store-msg #[(directory) "\303\304\305!!\212\306	!q\210\307 \210\310!\210\311\n!*\207" [msg-file-to-store mh-temp-buffer directory mh-msg-filename mh-get-msg-num t get-buffer-create erase-buffer insert-file-contents mh-store-buffer] 3 (#$ . 9057) (list (let ((udir (or mh-store-default-directory default-directory))) (read-file-name "Store message in directory: " udir udir nil)))])
#@248 Store the file(s) contained in the current buffer into DIRECTORY.
The buffer can contain a shar file or uuencoded file.
Default directory is the last directory used, or initially the value of
`mh-store-default-directory' or the current directory.
(defalias 'mh-store-buffer #[(directory) "\306!\212eb\210\307\310\311\312#\205# \313\314!\203 \315y\210\316 \210\313\317!?\205# `)\320\321!\322\323\f\204F \212eb\210\307\324\311\312#\203E `\311\210`{)\212q\210\325 \210\326!\204a \327\330\261\210\331\332\311\312%\210\333\330\261\210%\f\204u \334	\335\261\210)\336\337!\340\"\210\311&\341!'\342\fd\n\311\312&&)q\210\343\n&\"\210)\344c-\207" [directory uudecode-filename command log-buffer sh-start store-directory expand-file-name re-search-forward "^#![ 	]*/bin/sh\\|^#\\|^: " nil t looking-at "^[^a-z0-9\"]*cut here\\b" 1 beginning-of-line "^[#:]....+\n\\( ?\n\\)?end$" get-buffer-create "*Store Output*" "sh" "(unknown filename)" "^begin [0-7]+ " erase-buffer file-directory-p "mkdir " "\n" call-process "mkdir" "cd " "uudecode" " being uudecoded...\n" set-window-start display-buffer 0 file-name-as-directory call-process-region mh-handle-process-error "\n(mh-store finished)\n" mh-store-default-directory value default-directory] 7 (#$ . 9710) (list (let ((udir (or mh-store-default-directory default-directory))) (read-file-name "Store buffer in directory: " udir udir nil)))])
