Use image-url instead of gnus-image-url to unify the image url text properties.
[gnus] / lisp / shr.el
index 88e078b..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)
@@ -240,11 +240,10 @@ redirects somewhere else."
                    (progn
                      (setq found (shr-find-fill-point))
                      (not (eolp))))
-         (unless (prog1
-                     found
-                   (when (eq (preceding-char) ? )
-                     (delete-char -1))
-                   (insert "\n"))
+         (when (eq (preceding-char) ? )
+           (delete-char -1))
+         (insert "\n")
+         (unless found
            (put-text-property (1- (point)) (point) 'shr-break t)
            ;; No space is needed at the beginning of a line.
            (when (eq (following-char) ? )
@@ -573,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)))))