[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/undo-tree 18754c1 114/195: Use with-temp-buffer instead
From: |
Stefan Monnier |
Subject: |
[elpa] externals/undo-tree 18754c1 114/195: Use with-temp-buffer instead of with-temp-file when saving undo history. |
Date: |
Sat, 28 Nov 2020 13:41:33 -0500 (EST) |
branch: externals/undo-tree
commit 18754c1d1198eed870fb3820e8848925f7fa6d23
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Use with-temp-buffer instead of with-temp-file when saving undo history.
This allows auto-compression-mode to take effect if
undo-tree-make-history-save-file-name has been advised in the user's .emacs
to
return a compressed filename extension.
---
undo-tree.el | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/undo-tree.el b/undo-tree.el
index 83c1537..411e554 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2009-2012 Free Software Foundation, Inc
;; Author: Toby Cubitt <toby-undo-tree@dr-qubit.org>
-;; Version: 0.5.3
+;; Version: 0.5.4
;; 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
@@ -690,6 +690,12 @@
;;; Change Log:
;;
+;; Version 0.5.4
+;; * use `with-temp-buffer' instead of `with-temp-file' when saving undo
+;; history, so that `auto-compression-mode' can take effect if
+;; `undo-tree-make-history-save-file-name' has been advised in the user's
+;; .emacs to return a compressed filename extension
+;;
;; Version 0.5.3
;; * modified `undo-list-transfer-to-tree' and `undo-list-pop-changeset' to
;; cope better if undo boundary before undo-tree-canary is missing
@@ -3053,10 +3059,13 @@ without asking for confirmation."
;; discard undo-tree object pool before saving
(setf (undo-tree-object-pool tree) nil)
;; print undo-tree to file
- (with-temp-file filename
+ ;; NOTE: we use `with-temp-buffer' instead of `with-temp-file' to
+ ;; allow `auto-compression-mode' to take effect
+ (with-temp-buffer
(prin1 (sha1 buff) (current-buffer))
(terpri (current-buffer))
- (let ((print-circle t)) (prin1 tree (current-buffer))))))))
+ (let ((print-circle t)) (prin1 tree (current-buffer)))
+ (write-region nil nil filename))))))
- [elpa] externals/undo-tree e9a9102 164/195: Throw error if interactive commands called outside undo-tree-mode., (continued)
- [elpa] externals/undo-tree e9a9102 164/195: Throw error if interactive commands called outside undo-tree-mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree ffd18cd 175/195: Refactor undo-list-transfer-to-tree again in attempt to mitigate GC races., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 941bfe5 190/195: Don't attempt to save undo history if history file is unwritable., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 5a1ba84 017/195: Added standard Elisp package headers, including an extensive Commentary., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 62e6097 044/195: Added undo-tree-save/restore-state-to/from-register commands and keybindings, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree c638cbd 051/195: General code tidying and reorganisation., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree caa3bd0 082/195: Added new customization option to allow undo-in-region to be disabled., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 8972e4d 069/195: Use get-buffer-create when creating the visualizer buffer in undo-tree-visualize., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree d7c1b2c 118/195: "De-circle" undo-tree when saving to file, restore when loading., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 121cab9 136/195: Trivial typo fixes in comments., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 18754c1 114/195: Use with-temp-buffer instead of with-temp-file when saving undo history.,
Stefan Monnier <=
- [elpa] externals/undo-tree c9f78c3 137/195: Use new user-error instead of error for expected undo errors., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 1114679 135/195: Fix bugs in binding of undo-tree-insert-face., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 5d19d4e 155/195: Bump version number and copyright year., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree ffb346a 157/195: Install undo-tree undo/redo Edit menu bar items., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 19baf49 158/195: Fix undo/redo-in-region tree diagrams in Commentary., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 22d6c01 153/195: Fix bug that cleared tree when enabling undo-tree-mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 46639dd 154/195: Tweak undo history file names to match Emacs backup file names., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree fba51e6 146/195: Add undo-tree-visualizer[-mouse]-select functions to select node at pos or click., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 43663f6 159/195: Fix bug in menu entries that triggered error on null buffer-undo-tree., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 133b439 148/195: Set protected-local property on various visualizer variables., Stefan Monnier, 2020/11/28