From 7b6da1131b3fe14b1f77f5abb3574f8fd539f05e Mon Sep 17 00:00:00 2001 From: Chris Nixon Date: Mon, 19 Feb 2018 12:16:48 +0000 Subject: [PATCH] Only require html2text if it will be used html2text is deprecated in the emacs pretest, by unconditionally importing it mu4e causes a mildly irritating yes/no prompt to appear during startup. This change ensures that html2text is not loaded unless the emacs running is a version that does not have 'shr-insert-document --- mu4e/mu4e-message.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mu4e/mu4e-message.el b/mu4e/mu4e-message.el index d3caf922..efe6a753 100644 --- a/mu4e/mu4e-message.el +++ b/mu4e/mu4e-message.el @@ -31,12 +31,13 @@ (require 'mu4e-utils) (require 'cl) -(require 'html2text) (require 'flow-fill) (defcustom mu4e-html2text-command - (if (fboundp 'shr-insert-document) 'mu4e-shr2text 'html2text) + (if (fboundp 'shr-insert-document) + 'mu4e-shr2text + (progn (require 'html2text) 'html2text)) "Either a shell command or a function that converts from html to plain text.