From c0c790eb9b4cc907ae29e74da3169d5c61da91aa Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Tue, 31 Dec 2019 12:38:04 +0100 Subject: [PATCH] org: Fix use of image-map for inline images Don't set image-map for Emacs before v26. Variable image-map available with emacs-version 26. Reported by Johannes Brauer https://lists.gnu.org/archive/html/emacs-orgmode/2019-12/msg00391.html --- lisp/org.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index de03fa734..27aa0a263 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16804,7 +16804,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)