branch: externals/timeout
commit 366a1b821af969c26116e088ab0aa24dd7c0a637
Author: Jimmy Yuen Ho Wong <wyue...@gmail.com>
Commit: Jimmy Yuen Ho Wong <wyue...@gmail.com>

    Ensure buffer is live before making it current
---
 timeout.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/timeout.el b/timeout.el
index cb31da2092..d0fdf7e13b 100644
--- a/timeout.el
+++ b/timeout.el
@@ -76,7 +76,9 @@ This is intended for use as function advice."
                  (lambda (buf)
                    (cancel-timer debounce-timer)
                    (setq debounce-timer nil)
-                   (with-current-buffer buf
+                   (if (buffer-live-p buf)
+                       (with-current-buffer buf
+                         (apply orig-fn args))
                      (apply orig-fn args)))
                  (current-buffer))))))))
 

Reply via email to