(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)
(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) ? )
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)))))