From 199a0cedc349468b26b46062106f760aed119b5e Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 20 Jun 2015 01:09:17 -0400 Subject: Extend link support gnus-follow-last-message-link Before, this function only worked with gwene links that could be followed with shr functions. Using widgets, this should work for links in non-gwene buffers too. --- lisp/init-mail.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/init-mail.el b/lisp/init-mail.el index c4d3b93..1b4331d 100644 --- a/lisp/init-mail.el +++ b/lisp/init-mail.el @@ -107,13 +107,11 @@ With prefix argument COPY, just copy the link." (with-current-buffer gnus-article-buffer (save-excursion (goto-char (point-max)) - (shr-previous-link) + (widget-forward -1) (if copy - (shr-copy-url) - ;; Cannot use `shr-browse-url' directly because the - ;; `mouse-set-point' call moves point. - (browse-url - (get-text-property (point) 'shr-url)))))) + (kill-new (or (get-text-property (point) 'gnus-string) + (get-text-property (point) 'shr-url))) + (widget-button-press (point)))))) (defun km/gnus-open-github-patch () "Open patch from github email. -- cgit v1.2.3