240 |
;; Unavailable until recentf has been loaded. |
;; Unavailable until recentf has been loaded. |
241 |
(recentf-auto-cleanup)))) |
(recentf-auto-cleanup)))) |
242 |
|
|
243 |
|
(defcustom recentf-initialize-file-name-history t |
244 |
|
"*non-nil means to initialize `file-name-history' with the recent list. |
245 |
|
If `file-name-history' is not empty, do nothing." |
246 |
|
:group 'recentf |
247 |
|
:type 'boolean) |
248 |
|
|
249 |
(defcustom recentf-load-hook nil |
(defcustom recentf-load-hook nil |
250 |
"*Normal hook run at end of loading the `recentf' package." |
"*Normal hook run at end of loading the `recentf' package." |
251 |
:group 'recentf |
:group 'recentf |
1149 |
|
|
1150 |
(defun recentf-load-list () |
(defun recentf-load-list () |
1151 |
"Load a previously saved recent list. |
"Load a previously saved recent list. |
1152 |
Read data from the file specified by `recentf-save-file'." |
Read data from the file specified by `recentf-save-file'. |
1153 |
|
When `recentf-initialize-file-name-history' is non-nil, initialize an |
1154 |
|
empty `file-name-history' with the recent list." |
1155 |
(interactive) |
(interactive) |
1156 |
(let ((file (expand-file-name recentf-save-file))) |
(let ((file (expand-file-name recentf-save-file))) |
1157 |
(when (file-readable-p file) |
(when (file-readable-p file) |
1158 |
(load-file file)))) |
(load-file file) |
1159 |
|
(and recentf-initialize-file-name-history |
1160 |
|
(not file-name-history) |
1161 |
|
(setq file-name-history (mapcar 'abbreviate-file-name |
1162 |
|
recentf-list)))))) |
1163 |
|
|
1164 |
(defun recentf-cleanup () |
(defun recentf-cleanup () |
1165 |
"Remove all excluded or non-readable files from the recent list." |
"Remove all excluded or non-readable files from the recent list." |