diff options
-rw-r--r-- | custom/jao-custom-gnus.el | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index 1ba2192..8f76563 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -641,15 +641,24 @@ (add-hook 'gnus-select-article-hook #'jao-gnus--init-images) +(defun jao-gnus-browse-html () + (interactive) + (let ((browse-url-browser-function jao-browse-url-external-function) + (browse-url-handlers nil) + (browse-url-default-handlers nil)) + (gnus-article-browse-html-article))) + (defun jao-gnus-show-images () (interactive) - (save-window-excursion - (gnus-summary-select-article-buffer) - (save-excursion - (setq jao-gnus--images (not jao-gnus--images)) - (if jao-gnus--images - (gnus-article-show-images) - (gnus-article-remove-images))))) + (if window-system + (save-window-excursion + (gnus-summary-select-article-buffer) + (save-excursion + (setq jao-gnus--images (not jao-gnus--images)) + (if jao-gnus--images + (gnus-article-show-images) + (gnus-article-remove-images)))) + (jao-gnus-browse-html))) ;;;; remove html in From: (require 'shr) |