; Add a check for liveness to last change

This commit is contained in:
Sean Whitton 2025-04-03 16:44:10 +08:00
parent 4ace02755b
commit 91a75c0d46

View 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))