[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30669: Suppress "No MH variant found" messages
From: |
Glenn Morris |
Subject: |
bug#30669: Suppress "No MH variant found" messages |
Date: |
Thu, 01 Mar 2018 13:26:17 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Package: emacs,mh-e
Version: 26.1
Severity: minor
It's a long-standing issue that simply loading mh-e.el (eg when building
Emacs) often prints "No MH variant found on the system".
Ref eg https://sourceforge.net/p/mh-e/bugs/484/
Here's an attempt at a fix.
I have no systems configured to read mail with MH,
so this is largely untested.
Suppress "No MH variant found" message
* mh-e.el (mh-variant): Don't try to detect till actually needed.
* mh-e.el (mh-version, mh-variant-p):
* mh-comp.el (mh-insert-x-mailer): Ensure mh-variant-in-use is set.
diff --git i/lisp/mh-e/mh-comp.el w/lisp/mh-e/mh-comp.el
index cfdd2ae..c57e129 100644
--- i/lisp/mh-e/mh-comp.el
+++ w/lisp/mh-e/mh-comp.el
@@ -1056,6 +1056,7 @@ mh-compose-and-send-mail
(defun mh-insert-x-mailer ()
"Append an X-Mailer field to the header.
The versions of MH-E, Emacs, and MH are shown."
+ (or mh-variant-in-use (mh-variant-set 'autodetect))
;; Lazily initialize mh-x-mailer-string.
(when (and mh-insert-x-mailer-flag (null mh-x-mailer-string))
(setq mh-x-mailer-string
diff --git i/lisp/mh-e/mh-e.el w/lisp/mh-e/mh-e.el
index 05ff672..94b029b 100644
--- i/lisp/mh-e/mh-e.el
+++ w/lisp/mh-e/mh-e.el
@@ -430,6 +430,7 @@ mh-version
;; Emacs version.
(insert (emacs-version) "\n\n")
;; MH version.
+ (or mh-variant-in-use (mh-variant-set 'autodetect))
(if mh-variant-in-use
(insert mh-variant-in-use "\n"
" mh-progs:\t" mh-progs "\n"
@@ -876,6 +877,7 @@ mh-variant-set-variant
(defun mh-variant-p (&rest variants)
"Return t if variant is any of VARIANTS.
Currently known variants are `MH', `nmh', and `gnu-mh'."
+ (or mh-variant-in-use (mh-variant-set 'autodetect))
(let ((variant-in-use
(cadr (assoc 'variant (assoc mh-variant-in-use (mh-variants))))))
(not (null (member variant-in-use variants)))))
@@ -972,6 +974,7 @@ mh-variant
:set (lambda (symbol value)
(set-default symbol value) ;Done in mh-variant-set-variant!
(mh-variant-set value))
+ :initialize 'custom-initialize-default
:group 'mh-e
:package-version '(MH-E . "8.0"))
- bug#30669: Suppress "No MH variant found" messages,
Glenn Morris <=