Use image-url instead of gnus-image-url to unify the image url text properties.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 15 Nov 2010 22:57:44 +0000 (23:57 +0100)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Mon, 15 Nov 2010 22:57:44 +0000 (23:57 +0100)
lisp/ChangeLog
lisp/gnus-html.el
lisp/shr.el

index c3f6c73..fb17ab5 100644 (file)
@@ -1,5 +1,10 @@
 2010-11-15  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-html.el: Use image-url instead of gnus-image-url to unify the
+       image url text properties.
+
+       * shr.el: Ditto.
+
        * gnus-agent.el (gnus-agentize): Only do the auto-agentizing if
        gnus-agent-auto-agentize-methods is set.  Which it isn't.
 
index 46e5881..3b61567 100644 (file)
@@ -201,7 +201,7 @@ CHARS is a regexp-like character alternative (e.g., \"[)$]\")."
           (let ((alt-text (when (string-match "\\(alt\\|title\\)=\"\\([^\"]+\\)"
                                               parameters)
                             (xml-substitute-special (match-string 2 parameters)))))
-            (gnus-put-text-property start end 'gnus-image-url url)
+            (gnus-put-text-property start end 'image-url url)
             (if (gnus-html-image-url-blocked-p
                  url
                  (if (buffer-live-p gnus-summary-buffer)
@@ -344,7 +344,7 @@ Use ALT-TEXT for the image string."
 (defun gnus-html-browse-image ()
   "Browse the image under point."
   (interactive)
-  (browse-url (get-text-property (point) 'gnus-image-url)))
+  (browse-url (get-text-property (point) 'image-url)))
 
 (defun gnus-html-browse-url ()
   "Browse the image under point."
@@ -415,9 +415,9 @@ Return a string with image data."
   "Put an image with DATA from URL and optional ALT-TEXT."
   (when (gnus-graphic-display-p)
     (let* ((start (text-property-any (point-min) (point-max)
-                                    'gnus-image-url url))
+                                    'image-url url))
            (end (when start
-                  (next-single-property-change start 'gnus-image-url))))
+                  (next-single-property-change start 'image-url))))
       ;; Image found?
       (when start
         (let* ((image
@@ -459,7 +459,7 @@ Return a string with image data."
                                            'gnus-alt-text alt-text)
                     (when url
                       (gnus-put-text-property start (point)
-                                             'gnus-image-url url))
+                                             'image-url url))
                     (gnus-add-image 'external image)
                     t)
                 ;; Bad image, try to show something else
index d1788c3..876d7b1 100644 (file)
@@ -154,7 +154,7 @@ redirects somewhere else."
 (defun shr-browse-image ()
   "Browse the image under point."
   (interactive)
-  (let ((url (get-text-property (point) 'shr-image)))
+  (let ((url (get-text-property (point) 'image-url)))
     (if (not url)
        (message "No image under point")
       (message "Browsing %s..." url)
@@ -163,7 +163,7 @@ redirects somewhere else."
 (defun shr-insert-image ()
   "Insert the image under point into the buffer."
   (interactive)
-  (let ((url (get-text-property (point) 'shr-image)))
+  (let ((url (get-text-property (point) 'image-url)))
     (if (not url)
        (message "No image under point")
       (message "Inserting %s..." url)
@@ -572,7 +572,7 @@ Return a string with image data."
                          t))))
        (put-text-property start (point) 'keymap shr-map)
        (put-text-property start (point) 'shr-alt alt)
-       (put-text-property start (point) 'shr-image url)
+       (put-text-property start (point) 'image-url url)
        (put-text-property start (point) 'help-echo alt)
        (setq shr-state 'image)))))