diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/pdf-cache.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/pdf-cache.el b/lisp/pdf-cache.el index ea4182f..c946654 100644 --- a/lisp/pdf-cache.el +++ b/lisp/pdf-cache.el @@ -231,8 +231,9 @@ This function always returns nil." (add-hook 'pdf-info-close-document-hook 'pdf-cache-clear-images nil t) (add-hook 'pdf-annot-modified-functions 'pdf-cache--clear-images-of-annotations nil t)) - (push (pdf-cache--make-image page width data hash) - pdf-cache--image-cache) + (let ((image (pdf-cache--make-image page width data hash))) + (setq pdf-cache--image-cache + (cons image (delete image pdf-cache--image-cache)))) ;; Forget old image(s). (when (> (length pdf-cache--image-cache) pdf-cache-image-limit) |
