]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/vc/ediff-util.el: Loop the ediff-session-registry instead of buffers
authorLin Sun <sunlin7@hotmail.com>
Sun, 29 Dec 2024 06:55:01 +0000 (06:55 +0000)
committerEshel Yaron <me@eshelyaron.com>
Sat, 4 Jan 2025 20:58:46 +0000 (21:58 +0100)
This avoids aborting the loop if an error happens in some buffer.
(Bug#74881)

(cherry picked from commit 5fe7f86367c95dbc65dfed5acb34f8dca2b40fe9)

lisp/vc/ediff-util.el

index 80247711ebd06563a01c831d1afcda941c23b7e0..6064b581602ead9cc7bf49bbc1101096d8a54560 100644 (file)
@@ -219,12 +219,11 @@ to invocation.")
   ;; 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