1 ;;; -*- lexical-binding: t -*-
3 ;; Auto-cleanup and auto-save with no (message)
5 (defvar my/recentf-list-prev nil)
7 (defun my/recentf-periodic ()
8 (when (not (equal recentf-list my/recentf-list-prev))
9 (let ((inhibit-message t)) (recentf-cleanup))
10 (let ((inhibit-message t)) (recentf-save-list))
11 (setq my/recentf-list-prev recentf-list)))
13 (defun my/recentf-auto-cleanup-and-save ()
14 (run-with-idle-timer 30 t #'my/recentf-periodic))