summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-09-11 15:36:55 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-09-11 15:37:00 +0200
commitbde93182bf07251f66d571d9667a6c21b6af1930 (patch)
tree58d0c2ffff81c0582baf50af7d542594d5adc3f9
parentdbd8994e0daafc12153765315acefc3269b55b97 (diff)
downloademacs-bde93182bf07251f66d571d9667a6c21b6af1930.tar.gz
emacs-bde93182bf07251f66d571d9667a6c21b6af1930.tar.bz2
emacs-bde93182bf07251f66d571d9667a6c21b6af1930.zip
Tweak previous mailcap patch (for external viewers)
* lisp/net/mailcap.el (mailcap-view-mime): Delete contents of the buffer in the external case, too.
-rw-r--r--lisp/net/mailcap.el1
1 files changed, 1 insertions, 0 deletions
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))))