]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix lexical fallout in mm-inline-wash-with-file
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 21 Sep 2021 04:43:16 +0000 (06:43 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 21 Sep 2021 04:43:16 +0000 (06:43 +0200)
* lisp/gnus/mm-view.el (mm-inline-wash-with-file): This is only
called from the `links' handler, and it passes in `file' expecting
that to be dynamically bound.  Which is a very, very confusing
interface, but make that work again, anyway.

lisp/gnus/mm-view.el

index 2ec75a0bc59cb6deae9b1b3afcacb2f76cf8b02d..09660cd8b0373580cbcc5c873301d29fbb6cd5e7 100644 (file)
@@ -271,13 +271,14 @@ This is only used if `mm-inline-large-images' is set to
     (delete-region (match-beginning 0) (match-end 0))))
 
 (defun mm-inline-wash-with-file (post-func cmd &rest args)
-  (let ((file (make-temp-file
-              (expand-file-name "mm" mm-tmp-directory))))
+  (dlet ((file (make-temp-file
+               (expand-file-name "mm" mm-tmp-directory))))
     (let ((coding-system-for-write 'binary))
       (write-region (point-min) (point-max) file nil 'silent))
     (delete-region (point-min) (point-max))
     (unwind-protect
-       (apply #'call-process cmd nil t nil (mapcar (lambda (e) (eval e t)) args))
+       (apply #'call-process cmd nil t nil
+               (mapcar (lambda (e) (eval e t)) args))
       (delete-file file))
     (and post-func (funcall post-func))))