From: Philip K Date: Sat, 8 Aug 2020 11:59:03 +0000 (+0200) Subject: Use write-region when saving recentf file X-Git-Tag: emacs-28.0.90~6750 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a8e3b29b2b73292c8497fee8932b04fa07a2c08a;p=emacs.git Use write-region when saving recentf file * lisp/recentf.el (recentf-save-list): Don't generate backups for recentf files (bug#41060). --- 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)