aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-15 19:13:33 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-15 19:17:16 -0200
commit2d4b14482c92997b3c97731795e1eb6f054fecf6 (patch)
treebf00640dd41843d81250ce31fa26f3dc8f143e9f
parent6378af6a432f42b99487631117d3ee781fa17b0b (diff)
Hitting RET on link buttons calls sx-open-link
-rw-r--r--sx-button.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/sx-button.el b/sx-button.el
index 5a2f052..e00b086 100644
--- a/sx-button.el
+++ b/sx-button.el
@@ -98,9 +98,9 @@ usually part of a code-block."
(defun sx-button-follow-link (&optional pos)
"Follow link at POS. If POS is nil, use `point'."
(interactive)
- (browse-url
- (or (get-text-property (or pos (point)) 'sx-button-url)
- (sx-user-error "No url under point: %s" (or pos (point))))))
+ (let ((url (or (get-text-property (or pos (point)) 'sx-button-url)
+ (sx-user-error "No url under point: %s" (or pos (point))))))
+ (sx-open-link url)))
;;; Help-echo definitions