From bc72b5d984940dfebda3721cac0669d4780a2cdd Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 10 Apr 2012 04:34:57 +0200 Subject: Make `put-image' return the overlay created * 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/image.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/image.el') diff --git a/lisp/image.el b/lisp/image.el index be1b1ef8f48..b094f2464ec 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -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 -- cgit v1.2.1