Function: mailcap--async-shell
mailcap--async-shell is a byte-compiled function defined in
mailcap.el.gz.
Signature
(mailcap--async-shell COMMAND FILE)
Documentation
Asynchronously call MIME viewer shell COMMAND.
Replace %s in COMMAND with FILE, as per mailcap-mime-data.
Delete FILE once COMMAND exits.
Source Code
;; Defined in /usr/src/emacs/lisp/net/mailcap.el.gz
(defun mailcap--async-shell (command file)
"Asynchronously call MIME viewer shell COMMAND.
Replace %s in COMMAND with FILE, as per `mailcap-mime-data'.
Delete FILE once COMMAND exits."
(let ((buf (get-buffer-create " *mailcap shell*")))
(async-shell-command (format command file) buf)
(add-function :after (process-sentinel (get-buffer-process buf))
(lambda (proc _msg)
(when (memq (process-status proc) '(exit signal))
(delete-file file))))))