]> code.delx.au - gnu-emacs/commitdiff
Fix the prefix action of shr-copy-url
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 27 Jun 2016 20:26:02 +0000 (22:26 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 27 Jun 2016 20:26:02 +0000 (22:26 +0200)
* lisp/net/shr.el (shr-copy-url): Make the command really copy
the image url if given a prefix.

lisp/net/shr.el

index 9d42fde0756fe7398f1f54253292b7bfb6df3e7e..6b1998362d99697b7ba274844567bac7a255d73e 100644 (file)
@@ -296,8 +296,10 @@ image under point instead.
 If called twice, then try to fetch the URL and see whether it
 redirects somewhere else."
   (interactive "P")
-  (let ((url (or (get-text-property (point) 'shr-url)
-                (get-text-property (point) 'image-url))))
+  (let ((url (if image-url
+                 (get-text-property (point) 'image-url)
+               (or (get-text-property (point) 'shr-url)
+                   (get-text-property (point) 'image-url)))))
     (cond
      ((not url)
       (message "No URL under point"))