From 06a26e16c0a716e6744cfa9dc233ed9889a07fed Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 28 Dec 2024 14:38:55 +0200 Subject: [PATCH] ; Fix last change * lisp/vc/ediff-util.el (ediff--delete-temp-files-on-kill-emacs): Add commentary explaining the precautions. (Bug#74881) (cherry picked from commit c9be6f731de12b1c9eda0c51e188953e56ba0767) --- lisp/vc/ediff-util.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 2b5caa76ec7..a2ff65b875e 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -215,6 +215,10 @@ to invocation.") (defun ediff--delete-temp-files-on-kill-emacs () "Delete the temp-files associated with the ediff buffers." + ;; We inhibit interaction and ignore any errors to avoid the situation + ;; where this hook could prevent kill-emacs from shutting down Emacs, + ;; because user interaction is not possible (e.g., in a daemon), or + ;; if deleting these files signals an error. (ignore-errors (let ((inhibit-interaction t)) (dolist (b (buffer-list)) -- 2.39.5