1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Tweak previous mailcap patch (for external viewers)

* lisp/net/mailcap.el (mailcap-view-mime): Delete contents of the
buffer in the external case, too.
This commit is contained in:
Lars Ingebrigtsen 2020-09-11 15:36:55 +02:00
parent dbd8994e0d
commit bde93182bf

View file

@ -1138,6 +1138,7 @@ For instance, \"foo.png\" will result in \"image/png\"."
(unwind-protect
(let ((coding-system-for-write 'binary))
(write-region (point-min) (point-max) file nil 'silent)
(delete-region (point-min) (point-max))
(shell-command (format method file)))
(when (file-exists-p file)
(delete-file file))))