emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23.0.60; find-backup-file-name assumes base name of backup file name


From: Chong Yidong
Subject: Re: 23.0.60; find-backup-file-name assumes base name of backup file names
Date: Mon, 07 Apr 2008 11:18:25 -0400

> make-backup-file-name-function is a customizable variable in files.el
> for deciding the backup file name for a file. find-backup-file-name
> uses make-backup-file-name-1 for finding out the base names of the
> backup files:
>
>     (let* ((basic-name (make-backup-file-name-1 fn))
>            (base-versions (concat (file-name-nondirectory basic-name)
>                       ".~"))
>
> This assumes that make-backup-file-name is used for generating the
> backup file names, while make-backup-file-name-function could be
> customized. The result of this is, any customization to
> make-backup-file-name-function doesn't work as expected when the
> backup file name is in a different place than what is provided by the
> stock function (like say, a different directory).

In the code, find-backup-file-name only uses make-backup-file-name-1
when checking for numeric backup files (usually for files under version
control).  If it determines that a non-numeric backup file is desired,
it calls make-backup-file-name, which correctly checks
make-backup-file-name-function as desired.  Note that
make-backup-file-name-function only applies to non-numeric backup files.

So I think there is no problem here, unless you can give instructions
for reproducing a bug.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]