diff options
author | Phillip Lord <phillip.lord@russet.org.uk> | 2015-11-17 17:14:13 +0000 |
---|---|---|
committer | Phillip Lord <phillip.lord@russet.org.uk> | 2015-11-17 17:14:13 +0000 |
commit | 0c808ecb36049f77b715abe552e8eb6a5c593316 (patch) | |
tree | ab570b0ff3f1b5f889886135f7a63922222affed | |
parent | 8ee6f96adee2335331caa6f5e6db938b172c4382 (diff) | |
download | emacs-fix/segfault-from-run-undoable-change.tar.gz |
Move to idle timer.fix/segfault-from-run-undoable-change
-rw-r--r-- | lisp/simple.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 3d933134b88..bfb8212992a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2867,7 +2867,16 @@ REASON describes the reason that the boundary is being added; see "Ensure that the `undo-auto-boundary-timer' is set." (unless undo-auto--current-boundary-timer (setq undo-auto--current-boundary-timer - (run-at-time 10 nil #'undo-auto--boundary-timer)))) + (run-with-idle-timer 10 t + #'undo-auto--boundary-timer)))) + +(defun undo-auto--boundary-post-command-hook () + (remove-hook 'post-command-hook + #'undo-auto--boundary-post-command-hook) + (undo-auto--boundary-ensure-timer)) + +(add-hook 'post-command-hook + #'undo-auto--boundary-post-command-hook) ;; (defvar undo-auto--undoably-changed-buffers nil ;; "List of buffers that have changed recently. |