2013-06-24 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * net/shr.el (shr-browse-url): Use an external browser if given a
+ prefix.
+
* net/eww.el (eww-external-browser): Moved to shr.
2013-06-24 Ivan Kanis <ivan@kanis.fr>
(forward-line 1)
(goto-char end))))))
-(defun shr-browse-url ()
- "Browse the URL under point."
- (interactive)
+(defun shr-browse-url (&optional external)
+ "Browse the URL under point.
+If EXTERNAL, browse the URL using `shr-external-browser'."
+ (interactive "p")
(let ((url (get-text-property (point) 'shr-url)))
(cond
((not url)
((string-match "^mailto:" url)
(browse-url-mail url))
(t
- (browse-url url)))))
+ (if external
+ (funcall shr-external-browser url)
+ (browse-url url))))))
(defun shr-save-contents (directory)
"Save the contents from URL in a file."