Make links not shadow local commands
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Wed, 19 Jun 2013 14:03:52 +0000 (16:03 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Wed, 19 Jun 2013 14:03:52 +0000 (16:03 +0200)
* shr.el (shr-map): Bind [down-mouse-1] to browse URLs.

* shr.el (shr-urlify): Use `keymap' instead of `local-map' so that we
don't shadow mode-specific bindings.

lisp/ChangeLog
lisp/shr.el

index 445ae67..3bd4cb4 100644 (file)
@@ -1,5 +1,8 @@
 2013-06-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * shr.el (shr-urlify): Use `keymap' instead of `local-map' so that we
+       don't shadow mode-specific bindings.
+
        * eww.el (eww-browse-url): Don't push stuff onto history if there's
        nothing to push.
 
index b1c8434..acda83f 100644 (file)
@@ -136,7 +136,7 @@ cid: URL as the argument.")
     (define-key map "z" 'shr-zoom-image)
     (define-key map [tab] 'shr-next-link)
     (define-key map [backtab] 'shr-previous-link)
-    (define-key map [down-mouse-1] 'shr-browse-url)
+    (define-key map [follow-link] 'mouse-face)
     (define-key map "I" 'shr-insert-image)
     (define-key map "u" 'shr-copy-url)
     (define-key map "v" 'shr-browse-url)
@@ -819,7 +819,7 @@ START, and END.  Note that START and END should be markers."
    start (point)
    (list 'shr-url url
         'help-echo (if title (format "%s (%s)" url title) url)
-        'local-map shr-map)))
+        'keymap shr-map)))
 
 (defun shr-encode-url (url)
   "Encode URL."