diff options
author | Tom Willemse | 2020-04-26 21:45:30 -0700 |
---|---|---|
committer | Tom Willemse | 2020-04-26 21:45:30 -0700 |
commit | 3da3700fae9b141aa10c56941c98abea49214a00 (patch) | |
tree | 7ed91296c7c6a6cd05e2875657a3f6471b5374bc | |
parent | 18807d5461cbd62f1562b160585b510e576e82c4 (diff) | |
download | emacs-config-3da3700fae9b141aa10c56941c98abea49214a00.tar.gz emacs-config-3da3700fae9b141aa10c56941c98abea49214a00.zip |
Fix oni-core tests
-rw-r--r-- | oni-core.el | 14 | ||||
-rw-r--r-- | test/oni-core-test.el | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/oni-core.el b/oni-core.el index 86b4b0b..3ee3b6a 100644 --- a/oni-core.el +++ b/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) diff --git a/test/oni-core-test.el b/test/oni-core-test.el index eb9886e..b9cf0d2 100644 --- a/test/oni-core-test.el +++ b/test/oni-core-test.el @@ -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))))) |