From: Lars Ingebrigtsen Date: Fri, 11 Sep 2020 13:36:55 +0000 (+0200) Subject: Tweak previous mailcap patch (for external viewers) X-Git-Tag: emacs-28.0.90~6123 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bde93182bf07251f66d571d9667a6c21b6af1930;p=emacs.git Tweak previous mailcap patch (for external viewers) * lisp/net/mailcap.el (mailcap-view-mime): Delete contents of the buffer in the external case, too. --- 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))))