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

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

[elpa] externals/undo-tree 941bfe5 190/195: Don't attempt to save undo h


From: Stefan Monnier
Subject: [elpa] externals/undo-tree 941bfe5 190/195: Don't attempt to save undo history if history file is unwritable.
Date: Sat, 28 Nov 2020 13:41:50 -0500 (EST)

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

    Don't attempt to save undo history if history file is unwritable.
---
 undo-tree.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/undo-tree.el b/undo-tree.el
index 03adb79..3a28796 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -4,7 +4,7 @@
 
 ;; Author: Toby Cubitt <toby-undo-tree@dr-qubit.org>
 ;; Maintainer: Toby Cubitt <toby-undo-tree@dr-qubit.org>
-;; Version: 0.7.1
+;; Version: 0.7.2
 ;; Keywords: convenience, files, undo, redo, history, tree
 ;; URL: http://www.dr-qubit.org/emacs.php
 ;; Repository: http://www.dr-qubit.org/git/undo-tree.git
@@ -3385,7 +3385,9 @@ Note this will overwrite any existing undo history."
 (defun undo-tree-save-history-from-hook ()
   (when (and undo-tree-mode undo-tree-auto-save-history
             (not (eq buffer-undo-list t))
-            buffer-file-name)
+            buffer-file-name
+            (file-writable-p
+             (undo-tree-make-history-save-file-name buffer-file-name)))
     (undo-tree-save-history nil 'overwrite) nil))
 
 (define-obsolete-function-alias



reply via email to

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