From: Lars Ingebrigtsen Date: Mon, 24 Aug 2020 20:04:28 +0000 (+0200) Subject: Clarify sorting order by file-backup-file-names X-Git-Tag: emacs-28.0.90~6423 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=519fc10f121c59d6844afaf0ef0a1e1d67a2a934;p=emacs.git 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. --- 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'.