aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-09-21 06:43:16 +0200
committerLars Ingebrigtsen2021-09-21 06:43:16 +0200
commitd3bfe91ef57b7bc766a85ba1ab0abeabe880e474 (patch)
tree08d3eaf14d1b11ea9faea0a1d9a7decbe90a2caf
parent7e395a59b025c7f4be49294ad806addf5b1a25c9 (diff)
downloademacs-d3bfe91ef57b7bc766a85ba1ab0abeabe880e474.tar.gz
emacs-d3bfe91ef57b7bc766a85ba1ab0abeabe880e474.zip
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.
-rw-r--r--lisp/gnus/mm-view.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 2ec75a0bc59..09660cd8b03 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -271,13 +271,14 @@ This is only used if `mm-inline-large-images' is set to
271 (delete-region (match-beginning 0) (match-end 0)))) 271 (delete-region (match-beginning 0) (match-end 0))))
272 272
273(defun mm-inline-wash-with-file (post-func cmd &rest args) 273(defun mm-inline-wash-with-file (post-func cmd &rest args)
274 (let ((file (make-temp-file 274 (dlet ((file (make-temp-file
275 (expand-file-name "mm" mm-tmp-directory)))) 275 (expand-file-name "mm" mm-tmp-directory))))
276 (let ((coding-system-for-write 'binary)) 276 (let ((coding-system-for-write 'binary))
277 (write-region (point-min) (point-max) file nil 'silent)) 277 (write-region (point-min) (point-max) file nil 'silent))
278 (delete-region (point-min) (point-max)) 278 (delete-region (point-min) (point-max))
279 (unwind-protect 279 (unwind-protect
280 (apply #'call-process cmd nil t nil (mapcar (lambda (e) (eval e t)) args)) 280 (apply #'call-process cmd nil t nil
281 (mapcar (lambda (e) (eval e t)) args))
281 (delete-file file)) 282 (delete-file file))
282 (and post-func (funcall post-func)))) 283 (and post-func (funcall post-func))))
283 284