Ignore in recentf all files from the elpa dir and the savefile dir
This commit is contained in:
parent
3bed971d1a
commit
0c93a1c542
1 changed files with 9 additions and 0 deletions
|
@ -153,6 +153,15 @@ Will only occur if prelude-whitespace is also enabled."
|
||||||
(setq recentf-save-file (expand-file-name "recentf" prelude-savefile-dir)
|
(setq recentf-save-file (expand-file-name "recentf" prelude-savefile-dir)
|
||||||
recentf-max-saved-items 500
|
recentf-max-saved-items 500
|
||||||
recentf-max-menu-items 15)
|
recentf-max-menu-items 15)
|
||||||
|
|
||||||
|
(defun prelude-recentf-exclude-p (file)
|
||||||
|
"A predicate to decide whether to exclude FILE from recentf."
|
||||||
|
(let ((file-dir (file-truename (file-name-directory file))))
|
||||||
|
(-any-p (lambda (dir)
|
||||||
|
(string-prefix-p dir file-dir))
|
||||||
|
(mapcar 'file-truename (list prelude-savefile-dir package-user-dir)))))
|
||||||
|
|
||||||
|
(add-to-list 'recentf-exclude 'prelude-recentf-exclude-p)
|
||||||
(recentf-mode +1)
|
(recentf-mode +1)
|
||||||
|
|
||||||
;; use shift + arrow keys to switch between visible buffers
|
;; use shift + arrow keys to switch between visible buffers
|
||||||
|
|
Loading…
Reference in a new issue