diff --git a/lisp/org.el b/lisp/org.el index b1c35c35a..7eb69c394 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16875,7 +16875,9 @@ buffer boundaries with possible narrowing." (overlay-put ov 'modification-hooks (list 'org-display-inline-remove-overlay)) - (overlay-put ov 'keymap image-map) + (when (<= 26 emacs-major-version) + (cl-assert (boundp 'image-map)) + (overlay-put ov 'keymap image-map)) (push ov org-inline-image-overlays)))))))))))))))) (defun org-display-inline-remove-overlay (ov after _beg _end &optional _len)