Просмотр исходного кода

org-display-inline-images: Silence byte-compiler on Emacs <26

* lisp/org.el (org-display-inline-images): Guard image-map use with
boundp check rather than version check.

Guarding with a boundp will pacify the byte-compiler and is a direct
check that the thing we care about is available, so there's no need to
rely on the version check.

Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87y2d2mqik.fsf@localhost
Kyle Meyer 4 лет назад
Родитель
Сommit
df84100d0c
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      lisp/org.el

+ 1 - 2
lisp/org.el

@@ -16491,8 +16491,7 @@ buffer boundaries with possible narrowing."
 			      (overlay-put
 			       ov 'modification-hooks
 			       (list 'org-display-inline-remove-overlay))
-			      (when (<= 26 emacs-major-version)
-				(cl-assert (boundp 'image-map))
+			      (when (boundp 'image-map)
 				(overlay-put ov 'keymap image-map))
 			      (push ov org-inline-image-overlays))))))))))))))))