]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak previous mailcap patch (for external viewers)
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 11 Sep 2020 13:36:55 +0000 (15:36 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 11 Sep 2020 13:37:00 +0000 (15:37 +0200)
* lisp/net/mailcap.el (mailcap-view-mime): Delete contents of the
buffer in the external case, too.

lisp/net/mailcap.el

index e84fe5f2e0940ec4a9a652765ef9252481d64fbb..94cd9e21566d12e1165b33f4f69e1950c4651d8f 100644 (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))))