Added note about recentf-auto-cleanup.
--- a/.emacs-my Sat Jan 02 19:15:13 2021 +0200
+++ b/.emacs-my Sat Jan 02 19:44:27 2021 +0200
@@ -46,7 +46,6 @@
;; (recentf-load-list)
(setq recentf-save-file (concat user-emacs-directory ".recentf"))
-(setq recentf-auto-cleanup 600)
;; Prevent TRAMP to login on remote host when loading. Its take time and ask passwords!
(setq recentf-keep '(file-remote-p file-readable-p))
(setq recentf-exclude ; Use ``M-x recentf-cleanup`` to update recentf-list.
@@ -59,7 +58,11 @@
(setq recentf-max-menu-items 40)
(setq recentf-show-file-shortcuts-flag nil)
-(recentf-mode t)
+;; Need to be defined before loading "recentf" because default value is
+;; "mode", meaning cleanup when turning the mode on.
+(setq recentf-auto-cleanup 600)
+
+(recentf-mode 1)
(global-set-key (kbd "\e\eq") 'recentf-open-files)
(global-set-key [?\s-q] 'recentf-open-files)