Function: mh-variant-nmh-info
mh-variant-nmh-info is a byte-compiled function defined in mh-e.el.gz.
Signature
(mh-variant-nmh-info DIR)
Documentation
Return info for nmh variant in DIR assuming a temporary buffer is set up.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-e.el.gz
(defun mh-variant-nmh-info (dir)
"Return info for nmh variant in DIR assuming a temporary buffer is set up."
;; Sample '-version' outputs:
;; mhparam -- nmh-1.1-RC1 [compiled on chaak at Fri Jun 20 11:03:28 PDT 2003]
;; install-mh -- nmh-1.7.1 built October 26, 2019 on build-server-000
;; "libdir" was deprecated in nmh-1.7 in favor of "libexecdir", and
;; removed completely in nmh-1.8.
(let ((install-mh (expand-file-name "install-mh" dir)))
(when (mh-file-command-p install-mh)
(erase-buffer)
(call-process install-mh nil '(t nil) nil "-version")
(goto-char (point-min))
(when (search-forward-regexp "install-mh -- nmh-\\(\\S +\\)" nil t)
(let ((version (format "nmh %s" (match-string 1)))
(mh-progs dir))
`(,version
(variant nmh)
(mh-lib-progs ,(or (mh-profile-component "libdir")
(mh-profile-component "libexecdir")))
(mh-lib ,(mh-profile-component "etcdir"))
(mh-progs ,dir)
(flists ,(file-exists-p
(expand-file-name "flists" dir)))))))))