aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-08-04 01:02:41 +0100
committerDavid Bremner <david@tethera.net>2021-08-03 22:55:52 -0300
commitc1f542d68ae843eedc2f5686203aa41dbb6a38e7 (patch)
tree222bc9f80f378fdadd7119114f7d98b8b923118c
parent3fc2e5f23bbbe3e9341397712a6a4d786adb8d6a (diff)
emacs: honour notmuch-show-text/html-blocked-images in w3m messages
When mm-text-html-renderer is set to 'w3m, the variable playing the role of a regular expression for blocked images is w3m-ignored-image-url-regexp. We bind it when the renderer is not 'shr.
-rw-r--r--emacs/notmuch-show.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 9a95eb34..0f96c4fe 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -59,6 +59,7 @@
(defvar shr-blocked-images)
(defvar gnus-blocked-images)
(defvar shr-content-function)
+(defvar w3m-ignored-image-url-regexp)
;;; Options
@@ -823,7 +824,8 @@ will return nil if the CID is unknown or cannot be retrieved."
(let ((mm-inline-text-html-with-w3m-keymap nil)
;; FIXME: If we block an image, offer a button to load external
;; images.
- (gnus-blocked-images notmuch-show-text/html-blocked-images))
+ (gnus-blocked-images notmuch-show-text/html-blocked-images)
+ (w3m-ignored-image-url-regexp notmuch-show-text/html-blocked-images))
(notmuch-show-insert-part-*/* msg part content-type nth depth button))))
;;; Functions used by notmuch-show--insert-part-text/html-shr