>From 26eba81b8a05e394d495336749da171e1cdf355e Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Thu, 21 Apr 2022 17:04:19 +0200 Subject: [PATCH] Delete temporary Flymake Elisp files every time a process ends * elisp-mode.el (elisp-flymake-byte-compile): Handle terminal process states besides exit by also removing the temporary file. --- lisp/progmodes/elisp-mode.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 0dfff32f20..c99cf34db0 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -2101,7 +2101,11 @@ elisp-flymake-byte-compile :explanation (format "byte-compile process %s died" proc)))) (ignore-errors (delete-file temp-file)) - (kill-buffer output-buffer)))) + (kill-buffer output-buffer))) + (when (memq (process-status proc) '(failed closed signal)) + (message "Elisp flymake [%s]: %S" (buffer-file-name) (process-status proc)) + (ignore-errors (delete-file temp-file)) + (kill-buffer output-buffer))) :stderr " *stderr of elisp-flymake-byte-compile*" :noquery t))))) -- 2.30.2