From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#30669: Suppress "No MH variant found" messages Date: Fri, 02 Mar 2018 21:38:54 -0500 Message-ID: <7amuzprigx.fsf@fencepost.gnu.org> References: <7e7eqvejp2.fsf@fencepost.gnu.org> <83zi3rwq84.fsf@gnu.org> <41994.1519967306@olgas.newt.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1520044688 25308 195.159.176.226 (3 Mar 2018 02:38:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Mar 2018 02:38:08 +0000 (UTC) User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cc: 30669@debbugs.gnu.org To: Bill Wohler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 03 03:38:03 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1erx3j-00063V-5N for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Mar 2018 03:38:03 +0100 Original-Received: from localhost ([::1]:38304 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erx5l-00065P-QC for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Mar 2018 21:40:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erx5f-00065H-Os for bug-gnu-emacs@gnu.org; Fri, 02 Mar 2018 21:40:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erx5e-0002n9-T3 for bug-gnu-emacs@gnu.org; Fri, 02 Mar 2018 21:40:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33813) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1erx5e-0002mi-O5 for bug-gnu-emacs@gnu.org; Fri, 02 Mar 2018 21:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1erx5e-0001Lo-GL; Fri, 02 Mar 2018 21:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, mh-e-devel@lists.sourceforge.net Resent-Date: Sat, 03 Mar 2018 02:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30669 X-GNU-PR-Package: emacs,mh-e X-GNU-PR-Keywords: patch Original-Received: via spool by 30669-submit@debbugs.gnu.org id=B30669.15200447565137 (code B ref 30669); Sat, 03 Mar 2018 02:40:02 +0000 Original-Received: (at 30669) by debbugs.gnu.org; 3 Mar 2018 02:39:16 +0000 Original-Received: from localhost ([127.0.0.1]:41710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1erx4u-0001Kn-DU for submit@debbugs.gnu.org; Fri, 02 Mar 2018 21:39:16 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1erx4s-0001KX-Ic for 30669@debbugs.gnu.org; Fri, 02 Mar 2018 21:39:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erx4l-0001Vd-QZ for 30669@debbugs.gnu.org; Fri, 02 Mar 2018 21:39:08 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erx4b-0001EE-2O; Fri, 02 Mar 2018 21:38:57 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1erx4Y-0000gp-Mx; Fri, 02 Mar 2018 21:38:54 -0500 X-Spook: Organized crime S Key Ceridian First responder War on X-Ran: oKWK6&8f_nE70NYUq*GZ",r+rzHlBl:4bhzA.:76Z/]]]NqNRe(tDIvt5fm6fhe<_?}6t% X-Hue: black X-Attribution: GM In-Reply-To: <41994.1519967306@olgas.newt.com> (Bill Wohler's message of "Thu, 01 Mar 2018 21:08:26 -0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143857 Archived-At: Minor revision: diff --git i/lisp/mh-e/mh-comp.el w/lisp/mh-e/mh-comp.el index cfdd2ae..9415293 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 mh-variant)) ;; 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..7b587a8 100644 --- i/lisp/mh-e/mh-e.el +++ w/lisp/mh-e/mh-e.el @@ -410,6 +410,8 @@ mh-run-time-gnus-version (require 'gnus) gnus-version) +(defvar mh-variant) + ;;;###autoload (defun mh-version () "Display version information about MH-E and the MH mail handling system." @@ -430,6 +432,7 @@ mh-version ;; Emacs version. (insert (emacs-version) "\n\n") ;; MH version. + (or mh-variant-in-use (mh-variant-set mh-variant)) (if mh-variant-in-use (insert mh-variant-in-use "\n" " mh-progs:\t" mh-progs "\n" @@ -876,6 +879,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 mh-variant)) (let ((variant-in-use (cadr (assoc 'variant (assoc mh-variant-in-use (mh-variants)))))) (not (null (member variant-in-use variants))))) @@ -972,6 +976,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"))