[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/undo-tree 723eeeb 040/195: Improved undo-tree-visualize
From: |
Stefan Monnier |
Subject: |
[elpa] externals/undo-tree 723eeeb 040/195: Improved undo-tree-visualizer-quit behaviour |
Date: |
Sat, 28 Nov 2020 13:41:17 -0500 (EST) |
branch: externals/undo-tree
commit 723eeeb4631e3c37403236f1ed35b09aa397fb19
Author: tsc25 <tsc25@cantab.net>
Commit: tsc25 <tsc25@cantab.net>
Improved undo-tree-visualizer-quit behaviour
by making visualizer window soft-dedicated, and just using kill-buffer to
remove it. That way the window is deleted along with the buffer if the
visualizer buffer was displayed in a new window, but not if it was displayed
in an existing window. (This is akin to the mechanism used for the
*Completions* buffer).
---
undo-tree.el | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/undo-tree.el b/undo-tree.el
index d5bc7c2..b8d3a94 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -2,10 +2,10 @@
;;; undo-tree.el --- Treat undo history as a tree
-;; Copyright (C) 2009 Toby Cubitt
+;; Copyright (C) 2009-2010 Toby Cubitt
;; Author: Toby Cubitt <toby-undo-tree@dr-qubit.org>
-;; Version: 0.1.4
+;; Version: 0.1.5
;; Keywords: undo, redo, history, tree
;; URL: http://www.dr-qubit.org/emacs.php
@@ -462,6 +462,13 @@
;;; Change Log:
;;
+;; Version 0.1.5
+;; * modified `undo-tree-visualize' to mark the visualizer window as
+;; soft-dedicated and changed `undo-tree-visualizer-quit' to use
+;; `kill-buffer', so that visualizer window is deleted along with buffer if
+;; visualizer buffer was displayed in a new window, but not if it was
+;; displayed in an existing window.
+;;
;; Version 0.1.4
;; * modified `undo-tree-undo' and `undo-tree-redo' to always replace
;; redo/undo entries with new ones generated by `primitive-undo', as the new
@@ -1299,7 +1306,8 @@ using `undo-tree-redo'."
(add-hook 'before-change-functions 'undo-tree-kill-visualizer nil t)
;; prepare *undo-tree* buffer, then draw tree in it
(let ((undo-tree buffer-undo-tree)
- (buff (current-buffer)))
+ (buff (current-buffer))
+ (display-buffer-mark-dedicated 'soft))
(switch-to-buffer-other-window " *undo-tree*")
(undo-tree-visualizer-mode)
(setq undo-tree-visualizer-buffer buff)
@@ -1683,7 +1691,7 @@ using `undo-tree-redo' or `undo-tree-visualizer-redo'."
;; remove kill visualizer hook from parent buffer
(with-current-buffer undo-tree-visualizer-buffer
(remove-hook 'before-change-functions 'undo-tree-kill-visualizer t))
- (kill-buffer-and-window))
+ (kill-buffer))
(defun undo-tree-visualizer-set (pos)
- [elpa] externals/undo-tree f454e88 001/195: Started project to add vim-like undo tree handling to emacs., (continued)
- [elpa] externals/undo-tree f454e88 001/195: Started project to add vim-like undo tree handling to emacs., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree b2eab5a 016/195: Made visualizer buffer read-only., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4877b0f 008/195: Added markers to record positions of nodes in visualizer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 7f3c87d 030/195: Added installation instructions to commentary, and keybinding documentation, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree c8b2659 032/195: Prevented undo-tree-kill-visualizer from killing visualizer when undoing/redoing, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree c041ce8 033/195: Added missing (eval-when-compile (require 'cl)) line., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 3b1a83f 036/195: Fixed undo-tree-visualizer-quit to make it remove kill visualizer hook, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f3fc5cd 037/195: Modified undo-tree-undo/redo to always replace redo/undo entries, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f93420b 038/195: Remap undo-only to undo-tree-undo in undo-tree-map., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f8c3abf 039/195: Replaced save-excursion's with with-current-buffer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 723eeeb 040/195: Improved undo-tree-visualizer-quit behaviour,
Stefan Monnier <=
- [elpa] externals/undo-tree 8871f91 041/195: Added header containing git repository URL., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 3f5cc71 045/195: Updated commentary to include register commands,, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 5176770 047/195: Added missing Change Log entry., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f44688d 048/195: Prevent debugger being called on "No further redo information" error., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree bff9f31 049/195: Made undo-tree-visualizer-quit select window displaying parent buffer, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 04b1a6f 054/195: Fixed bugs in history-discarding logic., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 227473a 058/195: Modified undo-tree-node defstruct and macros to allow arbitrary meta-data, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 011e11e 061/195: Rebuild buffer-undo-list from tree when disabling undo-tree-mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree a4b591b 059/195: Indicate registers storing undo-tree state in visualizer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 6ab787bd 063/195: Added explanation of undo-in-region to Commentary., Stefan Monnier, 2020/11/28