[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: recentf improvement
From: |
David PONCE |
Subject: |
Re: recentf improvement |
Date: |
Mon, 22 Sep 2003 08:58:47 +0200 (CEST) |
Hi Richard,
> Finally, I don't see the point of calling `abbreviate-file-name' on
> every recent file before copying them to file-name-history?
>
> That is so the names in the history will be more concise.
> I think this is desirable, so I think you should put that call
> back in.
OK, here is a new patch.
David
Index: lisp/recentf.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/recentf.el,v
retrieving revision 1.27
diff -c -r1.27 recentf.el
*** lisp/recentf.el 15 Sep 2003 16:24:35 -0000 1.27
--- lisp/recentf.el 22 Sep 2003 06:52:58 -0000
***************
*** 240,245 ****
--- 240,251 ----
;; Unavailable until recentf has been loaded.
(recentf-auto-cleanup))))
+ (defcustom recentf-initialize-file-name-history t
+ "*non-nil means to initialize `file-name-history' with the recent list.
+ If `file-name-history' is not empty, do nothing."
+ :group 'recentf
+ :type 'boolean)
+
(defcustom recentf-load-hook nil
"*Normal hook run at end of loading the `recentf' package."
:group 'recentf
***************
*** 1143,1153 ****
(defun recentf-load-list ()
"Load a previously saved recent list.
! Read data from the file specified by `recentf-save-file'."
(interactive)
(let ((file (expand-file-name recentf-save-file)))
(when (file-readable-p file)
! (load-file file))))
(defun recentf-cleanup ()
"Remove all excluded or non-readable files from the recent list."
--- 1149,1165 ----
(defun recentf-load-list ()
"Load a previously saved recent list.
! Read data from the file specified by `recentf-save-file'.
! When `recentf-initialize-file-name-history' is non-nil, initialize an
! empty `file-name-history' with the recent list."
(interactive)
(let ((file (expand-file-name recentf-save-file)))
(when (file-readable-p file)
! (load-file file)
! (and recentf-initialize-file-name-history
! (not file-name-history)
! (setq file-name-history (mapcar 'abbreviate-file-name
! recentf-list))))))
(defun recentf-cleanup ()
"Remove all excluded or non-readable files from the recent list."
- Re: recentf improvement,
David PONCE <=