emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/undo-tree 46639dd 154/195: Tweak undo history file name


From: Stefan Monnier
Subject: [elpa] externals/undo-tree 46639dd 154/195: Tweak undo history file names to match Emacs backup file names.
Date: Sat, 28 Nov 2020 13:41:42 -0500 (EST)

branch: externals/undo-tree
commit 46639dd92e914ac76d94d8d37ae1174396002c1c
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>

    Tweak undo history file names to match Emacs backup file names.
    
    Fix undo-tree-auto-save-history docstring to make it consistent with what
    actually happens.
---
 undo-tree.el | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/undo-tree.el b/undo-tree.el
index 4e719fd..9b4efcd 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -883,9 +883,11 @@ when a buffer is saved to file.
 It will automatically load undo history when a buffer is loaded
 from file, if an undo save file exists.
 
-Undo-tree history is saved to a file called
-\".<buffer-file-name>.~undo-tree\" in the same directory as the
-file itself.
+By default, undo-tree history is saved to a file called
+\".<buffer-file-name>.~undo-tree~\" in the same directory as the
+file itself. To save under a different directory, customize
+`undo-tree-history-directory-alist' (see the documentation for
+that variable for details).
 
 WARNING! `undo-tree-auto-save-history' will not work properly in
 Emacs versions prior to 24.3, so it cannot be enabled via
@@ -2984,16 +2986,16 @@ Argument is a character, naming the register."
 
 (defun undo-tree-make-history-save-file-name (file)
   "Create the undo history file name for FILE.
-Normally this is the file's name with `.' prepended and
-`~undo-tree~' appended.
+Normally this is the file's name with \".\" prepended and
+\".~undo-tree~\" appended.
 
-A match for FILE is sought in `undo-tree-history-directory-alist';
-see the documentation of that variable.  If the directory for the
-backup doesn't exist, it is created."
+A match for FILE is sought in `undo-tree-history-directory-alist'
+\(see the documentation of that variable for details\). If the
+directory for the backup doesn't exist, it is created."
   (let* ((backup-directory-alist undo-tree-history-directory-alist)
         (name (make-backup-file-name-1 file)))
     (concat (file-name-directory name) "." (file-name-nondirectory name)
-           "~undo-tree~")))
+           ".~undo-tree~")))
 
 
 (defun undo-tree-save-history (&optional filename overwrite)



reply via email to

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