# HG changeset patch # User David Ponce # Date 1126771338 0 # Node ID f68d6281086a90ff1716b59b7d17a1e2862db00d # Parent d4001c18bf6436ad7b5e73349de0732a917f93f4 (recentf-save-file-modes): New option. (recentf-save-list): Use it. diff -r d4001c18bf64 -r f68d6281086a lisp/ChangeLog --- a/lisp/ChangeLog Thu Sep 15 04:12:27 2005 +0000 +++ b/lisp/ChangeLog Thu Sep 15 08:02:18 2005 +0000 @@ -1,3 +1,8 @@ +2005-09-15 David Ponce + + * recentf.el (recentf-save-file-modes): New option. + (recentf-save-list): Use it. + 2005-09-15 Nick Roberts * bindings.el (mode-line-eol-desc, mode-line-coding-system-map) diff -r d4001c18bf64 -r f68d6281086a lisp/recentf.el --- a/lisp/recentf.el Thu Sep 15 04:12:27 2005 +0000 +++ b/lisp/recentf.el Thu Sep 15 08:02:18 2005 +0000 @@ -74,6 +74,15 @@ :group 'recentf :type 'file) +(defcustom recentf-save-file-modes 384 ;; 0600 + "Mode bits of recentf save file, as an integer, or nil. +If non-nil, after writing `recentf-save-file', set its mode bits to +this value. By default give R/W access only to the user who owns that +file. See also the function `set-file-modes'." + :group 'recentf + :type '(choice (const :tag "Don't change" nil) + integer)) + (defcustom recentf-exclude nil "*List of regexps and predicates for filenames excluded from the recent list. When a filename matches any of the regexps or satisfies any of the @@ -257,7 +266,7 @@ If it returns nil, the filename is left unchanged." :group 'recentf :type '(choice (const :tag "None" nil) - (const abbreviate-file-name) + (const abbreviate-file-name) function)) (defcustom recentf-show-file-shortcuts-flag t @@ -1206,6 +1215,8 @@ (format ";;; coding: %s\n" recentf-save-file-coding-system) ";;; End:\n") (write-file (expand-file-name recentf-save-file)) + (when recentf-save-file-modes + (set-file-modes recentf-save-file recentf-save-file-modes)) nil) (error (warn "recentf mode: %s" (error-message-string error)))))