From bde93182bf07251f66d571d9667a6c21b6af1930 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 11 Sep 2020 15:36:55 +0200 Subject: [PATCH] Tweak previous mailcap patch (for external viewers) * lisp/net/mailcap.el (mailcap-view-mime): Delete contents of the buffer in the external case, too. --- lisp/net/mailcap.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el index e84fe5f2e09..94cd9e21566 100644 --- a/lisp/net/mailcap.el +++ b/lisp/net/mailcap.el @@ -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)))) -- 2.39.5