From a8e3b29b2b73292c8497fee8932b04fa07a2c08a Mon Sep 17 00:00:00 2001 From: Philip K Date: Sat, 8 Aug 2020 13:59:03 +0200 Subject: [PATCH] Use write-region when saving recentf file * lisp/recentf.el (recentf-save-list): Don't generate backups for recentf files (bug#41060). --- lisp/recentf.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/recentf.el b/lisp/recentf.el index 27918a9739c..877edd4be1f 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -1289,7 +1289,8 @@ Write data into the file specified by `recentf-save-file'." (insert "\n \n;; Local Variables:\n" (format ";; coding: %s\n" recentf-save-file-coding-system) ";; End:\n") - (write-file (expand-file-name recentf-save-file)) + (write-region (point-min) (point-max) + (expand-file-name recentf-save-file)) (when recentf-save-file-modes (set-file-modes recentf-save-file recentf-save-file-modes)) nil) -- 2.39.2