bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#74881: 31.0.50; [PATCH] * lisp/vc/ediff-util.el: Remove temp files o


From: Eli Zaretskii
Subject: bug#74881: 31.0.50; [PATCH] * lisp/vc/ediff-util.el: Remove temp files on kill-emacs
Date: Fri, 27 Dec 2024 10:10:37 +0200

> From: Lin Sun <sunlin7@hotmail.com>
> CC: "74881@debbugs.gnu.org" <74881@debbugs.gnu.org>
> Date: Fri, 27 Dec 2024 05:38:57 +0000
> 
> Hi Eli,
> 
> I checked the "ediff-delete-temp-files", it should be safe for executing.  Is 
> it more safe to wrap it with `ignore-errors` ? Like: 
> 
> +(defun ediff--delete-temp-files-on-kill-emacs ()
> +  "Delete the temp-files associated with the ediff buffers."
> +  (dolist (b (buffer-list))
> +    (with-current-buffer b
> +      (when (eq major-mode 'ediff-mode)
> +        (ignore-errors (ediff-delete-temp-files))))))
> 

Yes, probably.  For a good measure, I'd also bind inhibit-interaction
to a non-nil value, to make sure we never ever ask the user anything
inside ediff-delete-temp-files.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]