1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-07 08:00:48 -08:00

Fix lexical fallout in mm-inline-wash-with-file

* 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.
This commit is contained in:
Lars Ingebrigtsen 2021-09-21 06:43:16 +02:00
parent 7e395a59b0
commit d3bfe91ef5

View 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))))