;ELC   
;;; Compiled by jmorzins@kamp-krusty.mit.edu on Mon Oct  3 10:37:22 2005
;;; from file /afs/sipb/contrib/emacs/packages/mh-e-7.82/mh-init.el
;;; in Emacs version 21.4.1
;;; 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-init.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\300\301!\210\300\302!\207" [require cl mh-utils] 2)
#@63 Directory containing MH commands, such as inc, repl, and rmm.
(defvar mh-progs nil (#$ . 697))
#@104 Directory containing the MH library.
This directory contains, among other things, the components file.
(defvar mh-lib nil (#$ . 799))
#@104 Directory containing MH helper programs.
This directory contains, among other things, the mhl program.
(defvar mh-lib-progs nil (#$ . 940))
#@38 Non-nil means that we have `flists'.
(defvar mh-flists-present-flag nil (#$ . 1086))
(byte-code "\300\301\302\303#\210\300\304\302\303#\210\300\305\302\303#\207" [put mh-progs risky-local-variable t mh-lib mh-lib-progs] 4)
#@147 The MH variant currently in use; a string with variant and version number.
This differs from `mh-variant' when the latter is set to `autodetect'.
(defvar mh-variant-in-use nil (#$ . 1316))
#@191 Set the MH variant to VARIANT.
Sets `mh-progs', `mh-lib', `mh-lib-progs' and `mh-flists-present-flag'.
If the VARIANT is `autodetect', then first try nmh, then MH and finally
GNU mailutils.
(defalias 'mh-variant-set #[(variant) "\304\305\303 \"	\306=\206_ 	\307=\203? \310\311!\203 \312\313\n\"\202_ \310\314!\203, \312\313\n\"\202_ \310\315!\2039 \312\313\n\"\202_ \312\316!\202_ 	\235\203W \310	!?\205_ \312\317	\"\210\320\307!\202_ \312\321\322\323\324#\")\207" [valid-list variant mh-variant-in-use mh-variants mapcar #[(x) "@\207" [x] 1] none autodetect mh-variant-set-variant nmh message "%s installed as MH variant" mh mu-mh "No MH variant found on the system!" "Warning: %s variant not found.  Autodetecting..." mh-variant-set "Unknown variant.  Use %s" mapconcat #[(x) "\301\302@\"\207" [x format "%s"] 3] " or "] 6 (#$ . 1512) (list (completing-read "MH Variant: " (mapcar (lambda (x) (list (car x))) (mh-variants)) nil t))])
#@204 Setup the system variables for the MH variant named VARIANT.
If VARIANT is a string, use that key in the variable `mh-variants'.
If VARIANT is a symbol, select the first entry that matches that variant.
(defalias 'mh-variant-set-variant #[(variant) ";\203S \306	\"\205\343 \306	\"A\306\307\n\"\211A@)\306\310\n\"\211A@)\306\311\n\"\211A@)\306\312\n\"\211A@)\n\313\n\f	\211-\2079\205\343 	\313\314\313:\203\340 @\306\300A\"\211A@)=\203\323 @A\306\307\n\"\211A@)\306\310\n\"\211A@)\306\311\n\"\211A@)\306\312\n\"\211A@)\n\313\n\f	.\314\313\211\202\324 \314\203\340 A\211\202f ,\207" [variant mh-variants alist x lib-progs lib assoc mh-lib-progs mh-lib mh-progs flists nil t progs mh-x-mailer-string mh-flists-present-flag mh-variant-in-use #1=#:G2818 variant-list #2=#:G2819 #3=#:G2820 version] 6 (#$ . 2461)])
#@93 Return t if variant is any of VARIANTS.
Currently known variants are 'MH, 'nmh, and 'mu-mh.
(defalias 'mh-variant-p #[(&rest variants) "\305\306\305	\"\"\211A@)\211\f\235)??\207" [mh-variant-in-use mh-variants x variant-in-use variants assoc variant] 6 (#$ . 3368)])
#@240 List of directories to search for variants of the MH variant.
The list `exec-path' is searched in addition to this list.
There's no need for users to modify this list.  Instead add extra
directories to the customizable variable `mh-path'.
(defvar mh-sys-path '("/usr/local/nmh/bin" "/usr/local/bin/mh/" "/usr/local/mh/" "/usr/bin/mh/" "/usr/new/mh/" "/usr/contrib/mh/bin/" "/usr/pkg/bin/" "/usr/local/bin/" "/usr/local/bin/mu-mh/" "/usr/bin/mu-mh/") (#$ . 3645))
#@179 *List of directories to search for variants of the MH variant.
The directories will be searched for `mhparam' in addition to directories
listed in `mh-sys-path' and `exec-path'.
(custom-declare-variable 'mh-path 'nil '(#$ . -4115) :group 'mh :type '(repeat (directory)))
#@74 List describing known MH variants.
Created by the function `mh-variants'
(defvar mh-variants nil (#$ . 4392))
#@73 Return info for MH variant in DIR assuming a temporary buffer is setup.
(defalias 'mh-variant-mh-info #[(dir) "\304\305\"\306	!\205[ \307	!\205[ \310 \210\311	\312\313\312\314%\210eb\210\315\316\312\317#\205[ \320\321\322\323!\"\310 \210\311	\312\324\312\325%\210eb\210\315\326\312\317#\205Z \322\327!\n\330\331D\332D\333)D\334BBBBB))\207" [dir mhparam version libdir expand-file-name "mhparam" file-exists-p file-executable-p erase-buffer call-process nil (t nil) "-help" search-forward-regexp "version: MH \\(\\S +\\)" t format "MH %s" match-string 1 (t nil) "libdir" "^.*$" 0 (variant mh) mh-lib-progs mh-lib mh-progs ((flists nil))] 6 (#$ . 4508)])
#@94 Return info for GNU mailutils variant in DIR.
This assumes that a temporary buffer is setup.
(defalias 'mh-variant-mu-mh-info #[(dir) "\306\307\"\310	!\205p \311	!\205p \312 \210\313	\314\315\314\316%\210eb\210\317\320\314\321#\205p \322\323!\312 \210\313	\314\324\314\325\326&\210eb\210\317\327\314\321#\205o \322\323!eb\210\317\330\314\321#\205n \322\323!\310\306\331\"!\n\332\333D\334D\335D\304\fD\257*)))\207" [dir mhparam version libdir flists etcdir expand-file-name "mhparam" file-exists-p file-executable-p erase-buffer call-process nil (t nil) "-version" search-forward-regexp "mhparam (\\(GNU [Mm]ailutils \\S +\\))" t match-string 1 (t nil) "libdir" "etcdir" "^libdir:\\s-\\(\\S-+\\)\\s-*$" "^etcdir:\\s-\\(\\S-+\\)\\s-*$" "flists" (variant mu-mh) mh-lib-progs mh-lib mh-progs] 7 (#$ . 5174)])
#@74 Return info for nmh variant in DIR assuming a temporary buffer is setup.
(defalias 'mh-variant-nmh-info #[(dir) "\306\307\"\310	!\205s \311	!\205s \312 \210\313	\314\315\314\316%\210eb\210\317\320\314\321#\205s \322\323\324\325!\"\312 \210\313	\314\326\314\327\330&\210eb\210\317\331\314\321#\205r \324\325!eb\210\317\332\314\321#\205q \324\325!\310\306\333\"!\n\334\335D\336D\337D\304\fD\257*)))\207" [dir mhparam version libdir flists etcdir expand-file-name "mhparam" file-exists-p file-executable-p erase-buffer call-process nil (t nil) "-version" search-forward-regexp "mhparam -- nmh-\\(\\S +\\)" t format "nmh %s" match-string 1 (t nil) "libdir" "etcdir" "^libdir:\\s-\\(\\S-+\\)\\s-*$" "^etcdir:\\s-\\(\\S-+\\)\\s-*$" "flists" (variant nmh) mh-lib-progs mh-lib mh-progs] 7 (#$ . 5997)])
#@57 Return MH variant found in DIR, or nil if none present.
(defalias 'mh-variant-info #[(dir) "\212\303!\211q\210\304\n!\206 \305\n!\206 \306\n!\206 \307*\207" [mh-temp-buffer tmp-buffer dir get-buffer-create mh-variant-mh-info mh-variant-nmh-info mh-variant-mu-mh-info nil] 3 (#$ . 6810)])
#@226 Return a list of installed variants of MH on the system.
This function looks for MH in `mh-sys-path', `mh-path' and
`exec-path'. The format of the list of variants that is returned is described
by the variable `mh-variants'.
(defalias 'mh-variants #[nil "\203 \207\306\307\n\f#\306:\203/ @\310\311!!\312\301\"\210A\211\202 *	\237\306:\203n @\211\203e \313!\203e \314!\203e \315!\211\203d \312\300\"\210)A\211\2029 *)\207" [mh-variants list-unique mh-path mh-sys-path exec-path #1=#:G2821 nil append file-chase-links directory-file-name add-to-list file-directory-p file-readable-p mh-variant-info dir #2=#:G2822 variant] 5 (#$ . 7110)])
(provide 'mh-init)
