mirror of https://github.com/djcb/mu.git
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
This commit is contained in:
parent
6fe67b354d
commit
7b6da1131b
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue