From: Katsumi Yamaoka Date: Wed, 12 Sep 2018 07:21:15 +0000 (+0000) Subject: Don't highlight article if gnus-visual-p is nil (bug#32706) X-Git-Tag: emacs-27.0.90~4429 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9f58ed156974f6345a85da419c57c4235f549f2a;p=emacs.git Don't highlight article if gnus-visual-p is nil (bug#32706) * lisp/gnus/deuglify.el (gnus-outlook-display-article-buffer): Don't highlight article if gnus-visual-p is nil (bug#32706). --- diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index d2bc87caa27..b09f89772aa 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -299,8 +299,14 @@ It is run after `gnus-article-prepare-hook'." ;; it. Calling `gnus-article-prepare-display' on an already ;; prepared article removes all MIME parts. I'm unsure whether ;; this is a bug or not. - (gnus-article-highlight t) - (gnus-treat-article nil) + (when (gnus-visual-p 'article-highlight 'highlight) + (gnus-article-highlight t)) + (save-excursion + (save-restriction + (widen) + (article-goto-body) + (narrow-to-region (point) (point-max)) + (gnus-treat-article nil))) (gnus-run-hooks 'gnus-article-prepare-hook 'gnus-outlook-display-hook)))