branch: elpa/symbol-overlay
commit 200b3d2d7563de360c883f7cb044f00de534c6cf
Author: Steve Purcell <[email protected]>
Commit: Steve Purcell <[email protected]>
Ensure timer callback always runs in the triggering buffer
See #64
---
symbol-overlay.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/symbol-overlay.el b/symbol-overlay.el
index 0fea29900f..0d7f46e730 100644
--- a/symbol-overlay.el
+++ b/symbol-overlay.el
@@ -338,7 +338,12 @@ This only effects symbols in the current displayed window
if
(and symbol-overlay-timer (cancel-timer symbol-overlay-timer))
(setq symbol-overlay-timer
(and value (> value 0)
- (run-with-idle-timer value t 'symbol-overlay-maybe-put-temp))))
+ (run-with-idle-timer
+ value t
+ (lambda (buf)
+ (with-current-buffer buf
+ (symbol-overlay-maybe-put-temp)))
+ (current-buffer)))))
(defun symbol-overlay-post-command ()
"Installed on `post-command-hook'."