From: Lars Magne Ingebrigtsen Date: Fri, 19 Jul 2013 14:57:28 +0000 (+0200) Subject: * net/shr.el (shr-mouse-browse-url): New command and keystroke. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1759^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8ba8eec59b955466c7080b268709a6d195fb69ee;p=emacs.git * net/shr.el (shr-mouse-browse-url): New command and keystroke. Fixes: debbugs:14815 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5ab2e41f2e4..6b99c5719bb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-07-19 Lars Magne Ingebrigtsen + * net/shr.el (shr-mouse-browse-url): New command and keystroke + (bug#14815). + * net/eww.el (eww-process-text-input): Allow inputting when the point is at the start of the line, as the properties aren't front-sticky. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 83f7596f34f..6ddf8d2af90 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -143,6 +143,7 @@ cid: URL as the argument.") (define-key map [tab] 'shr-next-link) (define-key map [backtab] 'shr-previous-link) (define-key map [follow-link] 'mouse-face) + (define-key map [mouse-2] 'shr-mouse-browse-url) (define-key map "I" 'shr-insert-image) (define-key map "w" 'shr-copy-url) (define-key map "u" 'shr-copy-url) @@ -657,6 +658,12 @@ size, and full-buffer size." (forward-line 1) (goto-char end)))))) +(defun shr-mouse-browse-url (ev) + "Browse the URL under the mouse cursor." + (interactive "e") + (mouse-set-point ev) + (shr-browse-url)) + (defun shr-browse-url (&optional external) "Browse the URL under point. If EXTERNAL, browse the URL using `shr-external-browser'."