Fix oni-core tests
This commit is contained in:
parent
18807d5461
commit
3da3700fae
2 changed files with 8 additions and 8 deletions
14
oni-core.el
14
oni-core.el
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0426.153115
|
||||
;; Version: 2020.0426.214442
|
||||
;; Package-Requires: (oni-data-dir expand-region multiple-cursors embrace helpful)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -81,6 +81,11 @@
|
|||
(end-of-line)))
|
||||
(end-of-line))))
|
||||
|
||||
(defun oni-core-recentf-save-list-silently ()
|
||||
"Call ‘recentf-save-list’ but without showing a message about it."
|
||||
(let ((inhibit-message t))
|
||||
(recentf-save-list)))
|
||||
|
||||
(add-to-list 'auto-save-file-name-transforms
|
||||
`(".*" ,oni-core--auto-save-directory t)
|
||||
:append)
|
||||
|
@ -149,12 +154,7 @@
|
|||
|
||||
(unless oni-core--recentf-idle-timer
|
||||
(setq oni-core--recentf-idle-timer
|
||||
(run-with-idle-timer
|
||||
10
|
||||
t
|
||||
(lambda ()
|
||||
(let ((inhibit-message t))
|
||||
(recentf-save-list))))))
|
||||
(run-with-idle-timer 10 t #'oni-core-recentf-save-list-silently)))
|
||||
|
||||
(electric-indent-mode -1)
|
||||
(winner-mode)
|
||||
|
|
|
@ -65,6 +65,6 @@
|
|||
;; We already loaded it with the ‘require’ call above. We load it again so we
|
||||
;; can check that the timer set up in it doesn’t appear twice.
|
||||
(load-library "oni-core")
|
||||
(let* ((pred (lambda (elt) (eq 'recentf-save-list (aref elt 5))))
|
||||
(let* ((pred (lambda (elt) (eq 'oni-core-recentf-save-list-silently (aref elt 5))))
|
||||
(matches (delete nil (mapcar pred timer-idle-list))))
|
||||
(should (eq 1 (length matches)))))
|
||||
|
|
Loading…
Reference in a new issue