[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] /srv/bzr/emacs/elpa r255: Updated undo-tree package to vers
From: |
Toby S. Cubitt |
Subject: |
[ELPA-diffs] /srv/bzr/emacs/elpa r255: Updated undo-tree package to version 0.5.5. |
Date: |
Tue, 25 Sep 2012 17:22:47 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 255
committer: Toby S. Cubitt <address@hidden>
branch nick: elpa
timestamp: Tue 2012-09-25 17:22:47 +0200
message:
Updated undo-tree package to version 0.5.5.
Small bug-fix to avoid hooks triggering an error when trying to save undo
history in a buffer where undo is disabled.
modified:
packages/undo-tree/undo-tree.el
=== modified file 'packages/undo-tree/undo-tree.el'
--- a/packages/undo-tree/undo-tree.el 2012-09-11 15:56:59 +0000
+++ b/packages/undo-tree/undo-tree.el 2012-09-25 15:22:47 +0000
@@ -3,7 +3,7 @@
;; Copyright (C) 2009-2012 Free Software Foundation, Inc
;; Author: Toby Cubitt <address@hidden>
-;; Version: 0.5.4
+;; Version: 0.5.5
;; 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
@@ -1613,6 +1613,10 @@
(defun undo-list-transfer-to-tree ()
;; Transfer entries accumulated in `buffer-undo-list' to `buffer-undo-tree'.
+ ;; `undo-list-transfer-to-tree' should never be called when undo is disabled
+ ;; (i.e. `buffer-undo-tree' is t)
+ (assert (not (eq buffer-undo-tree t)))
+
;; if `buffer-undo-tree' is empty, create initial undo-tree
(when (null buffer-undo-tree) (setq buffer-undo-tree (make-undo-tree)))
;; make sure there's a canary at end of `buffer-undo-list'
@@ -2903,6 +2907,7 @@
If OVERWRITE is non-nil, any existing file will be overwritten
without asking for confirmation."
(interactive)
+ (when (eq buffer-undo-list t) (error "No undo information in this buffer"))
(undo-list-transfer-to-tree)
(when (and buffer-undo-tree (not (eq buffer-undo-tree t)))
(condition-case nil
@@ -3006,11 +3011,13 @@
;; Versions of save/load functions for use in hooks
(defun undo-tree-save-history-hook ()
- (when (and undo-tree-mode undo-tree-auto-save-history)
+ (when (and undo-tree-mode undo-tree-auto-save-history
+ (not (eq buffer-undo-list t)))
(undo-tree-save-history nil t) nil))
(defun undo-tree-load-history-hook ()
- (when (and undo-tree-mode undo-tree-auto-save-history)
+ (when (and undo-tree-mode undo-tree-auto-save-history
+ (not (eq buffer-undo-list t)))
(undo-tree-load-history nil t)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ELPA-diffs] /srv/bzr/emacs/elpa r255: Updated undo-tree package to version 0.5.5.,
Toby S. Cubitt <=