Browse Source

Backport commit 1137219c9 from Emacs

Make compat alias image-refresh obsolete
1137219c97dda512a309ce4bfad5abde0d2be206
Stefan Kangas
Tue Aug 9 14:04:39 2022 +0200

[ km: This was independently covered on the main branch with
  e73c5b7d0.  I'm applying it here too for bookkeeping/traceability
  purposes. ]
Stefan Kangas 2 years ago
parent
commit
25e638f726
2 changed files with 3 additions and 3 deletions
  1. 1 1
      lisp/org-plot.el
  2. 2 2
      lisp/org.el

+ 1 - 1
lisp/org-plot.el

@@ -622,7 +622,7 @@ manner suitable for prepending to a user-specified script."
   (dolist (img-overlay org-inline-image-overlays)
     (when (string= img-file (plist-get (cdr (overlay-get img-overlay 'display)) :file))
       (when (file-exists-p img-file)
-        (image-refresh (overlay-get img-overlay 'display))))))
+        (image-flush (overlay-get img-overlay 'display))))))
 
 ;;-----------------------------------------------------------------------------
 ;; facade functions

+ 2 - 2
lisp/org.el

@@ -16487,7 +16487,7 @@ INCLUDE-LINKED is passed to `org-display-inline-images'."
     (org-toggle-inline-images)))
 
 ;; For without-x builds.
-(declare-function image-refresh "image" (spec &optional frame))
+(declare-function image-flush "image" (spec &optional frame))
 
 (defcustom org-display-remote-inline-images 'skip
   "How to display remote inline images.
@@ -16628,7 +16628,7 @@ buffer boundaries with possible narrowing."
 				(org-element-property :begin link)
 				'org-image-overlay)))
 		      (if (and (car-safe old) refresh)
-			  (image-refresh (overlay-get (cdr old) 'display))
+                          (image-flush (overlay-get (cdr old) 'display))
 			(let ((image (org--create-inline-image file width)))
 			  (when image
 			    (let ((ov (make-overlay