]> git.eshelyaron.com Git - emacs.git/commitdiff
Make `put-image' return the overlay created
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 10 Apr 2012 02:34:57 +0000 (04:34 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 10 Apr 2012 02:34:57 +0000 (04:34 +0200)
* image.el (put-image): Return the overlay created instead of the
optional input string.  Note that this may break code
that is (for some reason or other) depending on `put-image'
returning the string.

Fixes: debbugs:7834
lisp/ChangeLog
lisp/image.el

index d29bc3e95d6928ce616d0036a5f83d27f89cddb1..07a0dfa7c2ac5580c9fcd5fd068dda55e5ea06aa 100644 (file)
@@ -1,5 +1,10 @@
 2012-04-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * image.el (put-image): Return the overlay created instead of the
+       optional input string (bug#7834).  Note that this may break code
+       that is (for some reason or other) depending on `put-image'
+       returning the string.
+
        * mouse-sel.el (mouse-sel-mode): Mark as obsolete (bug#6174).
 
        * simple.el (zap-to-char): Allow zapping using input methods
index be1b1ef8f489b69483ad1368b484029d86f53f26..b094f2464ecf2fdf4f05eea22d8aec7f54a2f9eb 100644 (file)
@@ -412,7 +412,8 @@ means display it in the right marginal area."
          (prop (if (null area) image (list (list 'margin area) image))))
       (put-text-property 0 (length string) 'display prop string)
       (overlay-put overlay 'put-image t)
-      (overlay-put overlay 'before-string string))))
+      (overlay-put overlay 'before-string string)
+      overlay)))
 
 
 ;;;###autoload