From 9f58ed156974f6345a85da419c57c4235f549f2a Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Wed, 12 Sep 2018 07:21:15 +0000 Subject: [PATCH] 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). --- lisp/gnus/deuglify.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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))) -- 2.39.2