GNU bug report logs -
#74881
31.0.50; [PATCH] * lisp/vc/ediff-util.el: Remove temp files on kill-emacs
Previous Next
Reported by: Lin Sun <sunlin7 <at> hotmail.com>
Date: Sun, 15 Dec 2024 06:00:02 UTC
Severity: normal
Tags: patch
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Lin Sun <sunlin7 <at> hotmail.com> writes:
> I didn't found a local version of `kill-emacs-hook` example in emacs
> git repo.
I would expect it to work. I found one in Gnu Elpa, in "subed.el".
> Current version also work for the killing from command line, for
> example executing a "pkill emacs" during ediff session.
I think this feature would not go.
> diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
> index 33666535843..d448973b345 100644
> --- a/lisp/vc/ediff-util.el
> +++ b/lisp/vc/ediff-util.el
> @@ -219,12 +219,11 @@ ediff--delete-temp-files-on-kill-emacs
> ;; 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))
> + (let ((inhibit-interaction t))
> + (dolist (b ediff-session-registry)
> + (ignore-errors
> (with-current-buffer b
> - (when (eq major-mode 'ediff-mode)
> - (ediff-delete-temp-files)))))))
> + (ediff-delete-temp-files))))))
>
> ;;; Setup functions
Yes, this is what I had in mind when the local hook can't be used.
Thank you,
Michael.
This bug report was last modified 135 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.