diff options
-rw-r--r-- | custom/jao-custom-gnus.el | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index 6eb7952..ece5167 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -553,9 +553,18 @@ (search-forward-regexp "^URL: h" nil t) (and (search-forward-regexp "^Link$" nil t) (not (beginning-of-line)))) - (if external - (jao-browse-with-external-browser) - (browse-url (jao-url-around-point)))))) + (cond (external (jao-browse-with-external-browser)) + ((featurep 'jao-custom-eww) (eww (jao-url-around-point))) + (t (browse-url (jao-url-around-point))))))) + +(defun jao-gnus-from-eww (keep-eww-buffer) + (interactive "P") + (unless keep-eww-buffer (jao-eww-close)) + (jao-afio-goto-mail) + (gnus-article-show-summary)) + +(with-eval-after-load 'eww + (define-key eww-mode-map (kbd "h") #'jao-gnus-from-eww)) (defun jao-gnus-open-enclosure () (interactive) |