From: Lars Ingebrigtsen Date: Mon, 24 Aug 2020 18:11:19 +0000 (+0200) Subject: Document file-backup-file-names X-Git-Tag: emacs-28.0.90~6426 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9c04760f169904fc56745a29227f1d4219f16e0a;p=emacs.git Document file-backup-file-names * doc/lispref/backups.texi (Backup Names): Document file-backup-file-names. --- diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index 4ed1a10fcf6..55b8d7215d3 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi @@ -414,10 +414,15 @@ version that the caller should consider deleting now. @end smallexample @end defun -@c Emacs 19 feature +@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. +@end defun + @defun file-newest-backup filename -This function returns the name of the most recent backup file for -@var{filename}, or @code{nil} if that file has no backup files. +This function returns the first element of the list returned by +@code{file-backup-file-names}. Some file comparison commands use this function so that they can automatically compare a file with its most recent backup. diff --git a/etc/NEWS b/etc/NEWS index 734d649dfa8..03516bf4d3a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1113,7 +1113,7 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el. * Lisp Changes in Emacs 28.1 ---- ++++ *** New function 'file-backup-file-names'. This function returns the list of file names of all the backup files of its file argument.