summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-09-23 17:34:46 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-09-23 17:38:19 +0200
commit6fb4f4ad80a660200365b57f22b3912e59ffe9dd (patch)
tree2030b830621db94132ed95a35948783f3d81edcd /lisp
parentf13300e84aecb89626eec6d62ce651270619a3e3 (diff)
downloademacs-6fb4f4ad80a660200365b57f22b3912e59ffe9dd.tar.gz
emacs-6fb4f4ad80a660200365b57f22b3912e59ffe9dd.tar.bz2
emacs-6fb4f4ad80a660200365b57f22b3912e59ffe9dd.zip
Inhibit image-crop when there's overlays
* lisp/image/image-crop.el (image-crop): Don't mess with overlays, because they're a pain to reconstruct (bug#58027).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/image/image-crop.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/image/image-crop.el b/lisp/image/image-crop.el
index 8ec4679b9ba..61ed7e1db17 100644
--- a/lisp/image/image-crop.el
+++ b/lisp/image/image-crop.el
@@ -143,6 +143,8 @@ After cropping an image, you can save it by `M-x image-save' or
(let ((image (get-text-property (point) 'display)))
(unless (imagep image)
(user-error "No image under point"))
+ (when (overlays-at (point))
+ (user-error "Can't edit images that have overlays"))
;; We replace the image under point with an SVG image that looks
;; just like that image. That allows us to draw lines over it.
;; At the end, we replace that SVG with a cropped version of the