From 519fc10f121c59d6844afaf0ef0a1e1d67a2a934 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 24 Aug 2020 22:04:28 +0200 Subject: [PATCH] Clarify sorting order by file-backup-file-names * doc/lispref/backups.texi (Backup Names): Ditto. * lisp/files.el (file-backup-file-names): Clarify sorting order. --- doc/lispref/backups.texi | 3 ++- lisp/files.el | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index 55b8d7215d3..e14f77f9fc4 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi @@ -417,7 +417,8 @@ version that the caller should consider deleting now. @defun file-backup-file-names filename This function returns a list of all the backup file names for @var{filename}, or @code{nil} if there are none. The files are sorted -so that the most recent backup file comes first in the list. +by modification time, descending, so that the most recent files are +first. @end defun @defun file-newest-backup filename diff --git a/lisp/files.el b/lisp/files.el index 5102585d7de..873f362dd59 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5659,7 +5659,8 @@ like `write-region' does." (defun file-backup-file-names (filename) "Return a list of backup files for FILENAME. -The list will be sorted by newness." +The list will be sorted by modification time so that the most +recent files are first." ;; `make-backup-file-name' will get us the right directory for ;; ordinary or numeric backups. It might create a directory for ;; backups as a side-effect, according to `backup-directory-alist'. -- 2.39.2