]> git.eshelyaron.com Git - emacs.git/commitdiff
Make image-map commands work with inline image attachments in mm
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 14 Jul 2022 17:40:06 +0000 (19:40 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 14 Jul 2022 17:40:06 +0000 (19:40 +0200)
* lisp/gnus/mm-view.el (mm-inline-image): Use insert-image so that
point movement is more pleasant and so that image-map commands
work (bug#56554).

lisp/gnus/mm-view.el

index 57ce36a94423d5c9cc082f3ce3a5637f99982c2a..5cfde5a864781c82cb48b5113d12a10bb66593df 100644 (file)
@@ -86,7 +86,7 @@ This is only used if `mm-inline-large-images' is set to
 (defun mm-inline-image (handle)
   (let ((b (point-marker))
        (inhibit-read-only t))
-    (put-image
+    (insert-image
      (let ((image (mm-get-image handle)))
        (if (eq mm-inline-large-images 'resize)
            (gnus-rescale-image
@@ -98,7 +98,7 @@ This is only used if `mm-inline-large-images' is set to
                    (truncate (* mm-inline-large-images-proportion
                                 (- (nth 3 edges) (nth 1 edges)))))))
          image))
-     b)
+     " ")
     (insert "\n")
     (mm-handle-set-undisplayer
      handle