[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/undo-tree ffb7c02 140/195: Set inhibit-read-only when c
From: |
Stefan Monnier |
Subject: |
[elpa] externals/undo-tree ffb7c02 140/195: Set inhibit-read-only when creating diff view. |
Date: |
Sat, 28 Nov 2020 13:41:39 -0500 (EST) |
branch: externals/undo-tree
commit ffb7c02489520450d13c771bc50faabf7347e43a
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Set inhibit-read-only when creating diff view.
Fixes diff view when diff-default-read-only option is set.
---
undo-tree.el | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/undo-tree.el b/undo-tree.el
index 370ed10..f29d442 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -965,7 +965,7 @@ drawing when the number of nodes in the tree is larger than
this
value.
Lazy drawing means that only the visible portion of the tree will
-be drawn initially , and the tree will be extended later as
+be drawn initially, and the tree will be extended later as
needed. For the most part, the only visible effect of this is to
significantly speed up displaying the visualizer for very large
trees.
@@ -3274,7 +3274,7 @@ signaling an error if file is not found."
(< top (line-number-at-pos
(undo-tree-node-marker node))))
(and (null top)
- ;; NOTE: check point in case window-start is outdated
+ ;; NOTE: we check point in case window-start is
outdated
(< (min (line-number-at-pos (point))
(line-number-at-pos (window-start)))
(line-number-at-pos
@@ -4211,14 +4211,15 @@ a negative prefix argument specifies `register'."
(current-buffer) tmpfile nil 'noasync
(get-buffer-create undo-tree-diff-buffer-name)))
;; delete process messages and useless headers from diff buffer
- (with-current-buffer buff
- (goto-char (point-min))
- (delete-region (point) (1+ (line-end-position 3)))
- (goto-char (point-max))
- (forward-line -2)
- (delete-region (point) (point-max))
- (setq cursor-type nil)
- (setq buffer-read-only t))
+ (let ((inhibit-read-only t))
+ (with-current-buffer buff
+ (goto-char (point-min))
+ (delete-region (point) (1+ (line-end-position 3)))
+ (goto-char (point-max))
+ (forward-line -2)
+ (delete-region (point) (point-max))
+ (setq cursor-type nil)
+ (setq buffer-read-only t)))
buff))
- [elpa] externals/undo-tree 98dbabd 125/195: Implement visualizer commands to redo/undo to branch/register., (continued)
- [elpa] externals/undo-tree 98dbabd 125/195: Implement visualizer commands to redo/undo to branch/register., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 85efe23 116/195: Ensure auto-compression-mode is enabled when reading undo history file., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 181e84b 124/195: Minor bug fix and tweak to visualizer register display., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 0ba2d37 122/195: Fix bug in undo-tree-clear-visualizer-data., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 443d74c 111/195: Avoid triggering error when saving undo history when there's nothing to save., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 5d06288 130/195: Implement lazy undo-tree drawing in visualizer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4c14173 115/195: Fix undo history auto-saving., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree e352286 131/195: Fix incompatiblity with newer high-resolution timestamps., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 0ba9a0f 134/195: Bump version number., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 17d2dee 141/195: Switch order of diff comparision in diff display., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree ffb7c02 140/195: Set inhibit-read-only when creating diff view.,
Stefan Monnier <=
- [elpa] externals/undo-tree b2c020f 138/195: Fix defadvice code snippet in commentary., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree a041902 142/195: Fix inverted key bindings., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree f726f6e 149/195: Don't restore undo history from file when reverting buffer., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree d0273ec 144/195: Make undo-tree-visualizer-[undo|redo]-to-x work in selection mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree d0e8793 145/195: Fix diff after undo-tree-visualize-[undo|redo]-to-x in selection mode., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 7d12602 150/195: Fix formatting bug in absolute timestamps., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 01b4a86 151/195: Update comment about Emacs version required for persistent history., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 8105f5f 143/195: Temporarily disable diff wto speed up undoing-to-x., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree aabc832 147/195: Remove unused variable., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 4cba00b 163/195: Fix one of the diagrams in the Commentary., Stefan Monnier, 2020/11/28