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.
(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)
(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."
"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
'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
(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)
(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)
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)))))