mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
(mh-variant-mh-info, mh-variant-nmh-info)
(mh-variant-set-variant, mh-variant-p, mh-profile-component) (mh-variant-set, mh-variant, mh-scan-format-file): Fix typo in docstring. (mh-variant-info,mh-variant-mu-mh-info) (mh-variant-p, mh-profile-component, mh-variant-set, mh-variant) (mh-scan-format-file): Rename variant mu-mh to gnu-mh and be explicit about GNU mailutils MH in docstrings (with thanks to Darel Henman) (closes SF #1768928).
This commit is contained in:
parent
d1c1d7c152
commit
efa477613f
1 changed files with 34 additions and 21 deletions
|
|
@ -140,8 +140,8 @@
|
|||
"/usr/contrib/mh/bin/" ; BSDI
|
||||
"/usr/pkg/bin/" ; NetBSD
|
||||
"/usr/local/bin/"
|
||||
"/usr/local/bin/mu-mh/" ; GNU mailutils - default
|
||||
"/usr/bin/mu-mh/") ; GNU mailutils - packaged
|
||||
"/usr/local/bin/mu-mh/" ; GNU mailutils MH - default
|
||||
"/usr/bin/mu-mh/") ; GNU mailutils MH - packaged
|
||||
"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
|
||||
|
|
@ -744,10 +744,10 @@ is described by the variable `mh-variants'."
|
|||
(cond
|
||||
((mh-variant-mh-info dir))
|
||||
((mh-variant-nmh-info dir))
|
||||
((mh-variant-mu-mh-info dir))))))
|
||||
((mh-variant-gnu-mh-info dir))))))
|
||||
|
||||
(defun mh-variant-mh-info (dir)
|
||||
"Return info for MH variant in DIR assuming a temporary buffer is setup."
|
||||
"Return info for MH variant in DIR assuming a temporary buffer is set up."
|
||||
;; MH does not have the -version option.
|
||||
;; Its version number is included in the output of "-help" as:
|
||||
;;
|
||||
|
|
@ -777,9 +777,9 @@ is described by the variable `mh-variants'."
|
|||
(mh-progs ,dir)
|
||||
(flists nil)))))))))
|
||||
|
||||
(defun mh-variant-mu-mh-info (dir)
|
||||
"Return info for GNU mailutils variant in DIR.
|
||||
This assumes that a temporary buffer is setup."
|
||||
(defun mh-variant-gnu-mh-info (dir)
|
||||
"Return info for GNU mailutils MH variant in DIR.
|
||||
This assumes that a temporary buffer is set up."
|
||||
;; 'mhparam -version' output:
|
||||
;; mhparam (GNU mailutils 0.3.2)
|
||||
(let ((mhparam (expand-file-name "mhparam" dir)))
|
||||
|
|
@ -792,7 +792,7 @@ This assumes that a temporary buffer is setup."
|
|||
(let ((version (match-string 1))
|
||||
(mh-progs dir))
|
||||
`(,version
|
||||
(variant mu-mh)
|
||||
(variant gnu-mh)
|
||||
(mh-lib-progs ,(mh-profile-component "libdir"))
|
||||
(mh-lib ,(mh-profile-component "etcdir"))
|
||||
(mh-progs ,dir)
|
||||
|
|
@ -800,7 +800,7 @@ This assumes that a temporary buffer is setup."
|
|||
(expand-file-name "flists" dir)))))))))
|
||||
|
||||
(defun mh-variant-nmh-info (dir)
|
||||
"Return info for nmh variant in DIR assuming a temporary buffer is setup."
|
||||
"Return info for nmh variant in DIR assuming a temporary buffer is set up."
|
||||
;; `mhparam -version' outputs:
|
||||
;; mhparam -- nmh-1.1-RC1 [compiled on chaak at Fri Jun 20 11:03:28 PDT 2003]
|
||||
(let ((mhparam (expand-file-name "mhparam" dir)))
|
||||
|
|
@ -824,7 +824,7 @@ This assumes that a temporary buffer is setup."
|
|||
(and (file-regular-p file) (file-executable-p file)))
|
||||
|
||||
(defun mh-variant-set-variant (variant)
|
||||
"Setup the system variables for the MH variant named VARIANT.
|
||||
"Set up the system variables for the MH variant named VARIANT.
|
||||
If VARIANT is a string, use that key in the alist returned by the
|
||||
function `mh-variants'.
|
||||
If VARIANT is a symbol, select the first entry that matches that
|
||||
|
|
@ -864,7 +864,7 @@ variant."
|
|||
|
||||
(defun mh-variant-p (&rest variants)
|
||||
"Return t if variant is any of VARIANTS.
|
||||
Currently known variants are 'MH, 'nmh, and 'mu-mh."
|
||||
Currently known variants are 'MH, 'nmh, and 'gnu-mh."
|
||||
(let ((variant-in-use
|
||||
(cadr (assoc 'variant (assoc mh-variant-in-use (mh-variants))))))
|
||||
(not (null (member variant-in-use variants)))))
|
||||
|
|
@ -872,8 +872,9 @@ Currently known variants are 'MH, 'nmh, and 'mu-mh."
|
|||
(defun mh-profile-component (component)
|
||||
"Return COMPONENT value from mhparam, or nil if unset."
|
||||
(save-excursion
|
||||
;; MH and nmh use -components, Mailutils uses -component. Since MH
|
||||
;; and nmh work with an unambiguous prefix, the `s' is dropped here.
|
||||
;; MH and nmh use -components, GNU mailutils MH uses -component.
|
||||
;; Since MH and nmh work with an unambiguous prefix, the `s' is
|
||||
;; dropped here.
|
||||
(mh-exec-cmd-quiet nil "mhparam" "-component" component)
|
||||
(mh-profile-component-value component)))
|
||||
|
||||
|
|
@ -895,12 +896,23 @@ Returns nil if the component is not in the buffer."
|
|||
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."
|
||||
finally GNU mailutils MH."
|
||||
(interactive
|
||||
(list (completing-read
|
||||
"MH variant: "
|
||||
(mapcar (lambda (x) (list (car x))) (mh-variants))
|
||||
nil t)))
|
||||
|
||||
;; TODO Remove mu-mh backwards compatibility in 9.0.
|
||||
(when (and (stringp variant)
|
||||
(string-match "^mu-mh" variant))
|
||||
(message
|
||||
(format "%s\n%s; %s" "The variant name mh-mh has been renamed to gnu-mh"
|
||||
"and will be removed in MH-E 9.0"
|
||||
"try M-x customize-option mh-variant"))
|
||||
(sit-for 5)
|
||||
(setq variant (concat "gnu-mh" (substring variant (match-end 0)))))
|
||||
|
||||
(let ((valid-list (mapcar (lambda (x) (car x)) (mh-variants))))
|
||||
(cond
|
||||
((eq variant 'none))
|
||||
|
|
@ -910,7 +922,7 @@ finally GNU mailutils."
|
|||
(message "%s installed as MH variant" mh-variant-in-use))
|
||||
((mh-variant-set-variant 'mh)
|
||||
(message "%s installed as MH variant" mh-variant-in-use))
|
||||
((mh-variant-set-variant 'mu-mh)
|
||||
((mh-variant-set-variant 'gnu-mh)
|
||||
(message "%s installed as MH variant" mh-variant-in-use))
|
||||
(t
|
||||
(message "No MH variant found on the system"))))
|
||||
|
|
@ -919,7 +931,8 @@ finally GNU mailutils."
|
|||
(message "Warning: %s variant not found. Autodetecting..." variant)
|
||||
(mh-variant-set 'autodetect)))
|
||||
(t
|
||||
(message "Unknown variant; use %s"
|
||||
(message "Unknown variant %s; use %s"
|
||||
variant
|
||||
(mapconcat '(lambda (x) (format "%s" (car x)))
|
||||
(mh-variants) " or "))))))
|
||||
|
||||
|
|
@ -928,14 +941,14 @@ finally GNU mailutils."
|
|||
|
||||
The default setting of this option is \"Auto-detect\" which means
|
||||
that MH-E will automatically choose the first of nmh, MH, or GNU
|
||||
mailutils that it finds in the directories listed in
|
||||
mailutils MH that it finds in the directories listed in
|
||||
`mh-path' (which you can customize), `mh-sys-path', and
|
||||
`exec-path'. If MH-E can't find MH at all, you may have to
|
||||
customize `mh-path' and add the directory in which the command
|
||||
\"mhparam\" is located. If, on the other hand, you have both nmh
|
||||
and mailutils installed (for example) and `mh-variant-in-use' was
|
||||
initialized to nmh but you want to use mailutils, then you can
|
||||
set this option to \"mailutils\".
|
||||
and GNU mailutils MH installed (for example) and
|
||||
`mh-variant-in-use' was initialized to nmh but you want to use
|
||||
GNU mailutils MH, then you can set this option to \"gnu-mh\".
|
||||
|
||||
When this variable is changed, MH-E resets `mh-progs', `mh-lib',
|
||||
`mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use'
|
||||
|
|
@ -1996,7 +2009,7 @@ set SYMBOL to VALUE."
|
|||
The default setting for this option is \"Use MH-E scan Format\". This
|
||||
means that the format string will be taken from the either
|
||||
`mh-scan-format-mh' or `mh-scan-format-nmh' depending on whether MH or
|
||||
nmh (or GNU mailutils) is in use. This setting also enables you to
|
||||
nmh (or GNU mailutils MH) is in use. This setting also enables you to
|
||||
turn on the `mh-adaptive-cmd-note-flag' option.
|
||||
|
||||
You can also set this option to \"Use Default scan Format\" to get the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue