diff --git a/mu4e/mu4e-vars.el b/mu4e/mu4e-vars.el index 1b033a21..3d0d85ce 100644 --- a/mu4e/mu4e-vars.el +++ b/mu4e/mu4e-vars.el @@ -248,6 +248,11 @@ and `mu4e-headers-visible-columns'." (const :tag "Don't split" nil)) :group 'mu4e-headers) +(defcustom mu4e-view-max-specpdl-size 4096 + "The value of `max-specpdl-size' for displaying messages with Gnus." + :type 'integer + :group 'mu4e-view) + (defcustom mu4e-view-show-images nil "If non-nil, automatically display images in the view buffer." :type 'boolean diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index 32db3b62..ab094552 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -371,7 +371,8 @@ article-mode." (article-de-base64-unreadable) (article-de-quoted-unreadable) (run-hooks 'gnus-article-decode-hook) - (gnus-article-prepare-display) + (let ((max-specpdl-size mu4e-view-max-specpdl-size)) + (gnus-article-prepare-display)) (mu4e-view-mode) (setq mu4e~view-msg msg) (setq gnus-article-decoded-p gnus-article-decode-hook)