From a0314231fae52fea7b976bb9bf82dcf2b2eec89f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 28 Mar 2007 03:26:26 +0000 Subject: Stephen Berman : (recentf-save-file): Add a custom :set function. --- lisp/recentf.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lisp/recentf.el') diff --git a/lisp/recentf.el b/lisp/recentf.el index 12e4dd7ec57..c55f15c69e9 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -72,7 +72,14 @@ See the command `recentf-save-list'." (defcustom recentf-save-file "~/.recentf" "*File to save the recent list into." :group 'recentf - :type 'file) + :type 'file + :initialize 'custom-initialize-default + :set (lambda (symbol value) + (let ((oldvalue (eval symbol))) + (custom-set-default symbol value) + (and (not (equal value oldvalue)) + recentf-mode + (recentf-load-list))))) (defcustom recentf-save-file-modes 384 ;; 0600 "Mode bits of recentf save file, as an integer, or nil. -- cgit v1.2.1