diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-06-20 01:09:17 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-06-20 01:09:17 -0400 |
commit | 199a0cedc349468b26b46062106f760aed119b5e (patch) | |
tree | c5e2e25d146f9774be8d426d01d53791db632208 /lisp | |
parent | e80a4387c0620ec3495f4bd3c7e82135912422bd (diff) | |
download | emacs.d-199a0cedc349468b26b46062106f760aed119b5e.tar.gz |
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.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-mail.el | 10 |
1 files changed, 4 insertions, 6 deletions
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. |