From: Eli Zaretskii Date: Sat, 28 Dec 2024 12:38:55 +0000 (+0200) Subject: ; Fix last change X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=06a26e16c0a716e6744cfa9dc233ed9889a07fed;p=emacs.git ; 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) --- 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))