]> git.eshelyaron.com Git - emacs.git/commitdiff
; Add a check for liveness to last change
authorSean Whitton <spwhitton@spwhitton.name>
Thu, 3 Apr 2025 08:44:10 +0000 (16:44 +0800)
committerEshel Yaron <me@eshelyaron.com>
Thu, 3 Apr 2025 16:52:07 +0000 (18:52 +0200)
(cherry picked from commit 91a75c0d460efb7490c7901ff8572adb14cd50db)

lisp/vc/vc-dispatcher.el

index 1a9ca2de5c9a96e89e5f98692c8fb38c87f3adfc..00aea22d563fd43983d2625ef77e09ea6d10f45e 100644 (file)
@@ -205,8 +205,9 @@ Another is that undo information is not kept."
     ;; See bug#53626 and bug#77306.
     (setq default-directory olddir)
     (run-with-timer 0 nil (lambda ()
-                            (with-current-buffer buf
-                              (setq default-directory olddir))))
+                            (when (buffer-live-p buf)
+                              (with-current-buffer buf
+                                (setq default-directory olddir)))))
 
     (let ((buffer-undo-list t)
           (inhibit-read-only t))