[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/undo-tree 7f3c87d 030/195: Added installation instructi
From: |
Stefan Monnier |
Subject: |
[elpa] externals/undo-tree 7f3c87d 030/195: Added installation instructions to commentary, and keybinding documentation |
Date: |
Sat, 28 Nov 2020 13:41:14 -0500 (EST) |
branch: externals/undo-tree
commit 7f3c87d8888b97be78786b20b9f00edc23355da4
Author: tsc25 <tsc25@cantab.net>
Commit: tsc25 <tsc25@cantab.net>
Added installation instructions to commentary, and keybinding documentation
to undo-tree-mode docstring.
In order to document scroll-left and scroll-right commands, had to replace
anonymous lambda keybindings in undo-tree-visualizer-map with new
undo-tree-visualizer-scroll-left and undo-tree-visualizer-scroll-right
commands.
---
undo-tree.el | 54 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 48 insertions(+), 6 deletions(-)
diff --git a/undo-tree.el b/undo-tree.el
index 9db7262..de0f78d 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -50,6 +50,25 @@
;; best ideas from their competitors!
;;
;;
+;; Installation
+;; ============
+;;
+;; To install `undo-tree-mode', make sure this file is saved in a directory in
+;; your `load-path', and add the line:
+;;
+;; (require 'undo-tree)
+;;
+;; to your .emacs file.
+;;
+;; If you want to replace the standard Emacs' undo system with the
+;; `undo-tree-mode' system in all buffers, you can enable it globally by
+;; adding:
+;;
+;; (global-undo-tree-mode)
+;;
+;; to your .emacs file.
+;;
+;;
;; Quick-Start
;; ===========
;;
@@ -72,7 +91,7 @@
;; (What does this mean? Better press the button and see!)
;;
;; C-x u (`undo-tree-visualize')
-;; Visualize undo tree.
+;; Visualize the undo tree.
;; (Better try pressing this button too!)
;;
;;
@@ -427,6 +446,10 @@
;; undo, and even then it was buggy until recently (see Emacs bug#4803), it
;; seems likely that relatively little code relies heavily on correct marker
;; restoration.
+;;
+;; `undo-tree-mode' doesn't support "undo in region", i.e. selectively undoing
+;; only the changes that affect the current region in
+;; `transient-mark-mode'). Support for this is planned for a future version.
@@ -542,13 +565,13 @@ in visualizer.")
'undo-tree-visualizer-toggle-timestamps)
;; horizontal scrolling may be needed if tree is very wide
(define-key undo-tree-visualizer-map ","
- (lambda () (interactive) "Scroll left." (scroll-right 1 t)))
+ 'undo-tree-visualizer-scroll-left)
(define-key undo-tree-visualizer-map "."
- (lambda () (interactive) "Scroll right." (scroll-left 1 t)))
+ 'undo-tree-visualizer-scroll-right)
(define-key undo-tree-visualizer-map "<"
- (lambda () (interactive) "Scroll left." (scroll-right 1 t)))
+ 'undo-tree-visualizer-scroll-left)
(define-key undo-tree-visualizer-map ">"
- (lambda () (interactive) "Scroll right." (scroll-left 1 t)))
+ 'undo-tree-visualizer-scroll-right)
;; quit visualizer
(define-key undo-tree-visualizer-map "q"
'undo-tree-visualizer-quit)
@@ -1010,7 +1033,16 @@ A negative prefix argument turns it off.
Undo-tree-mode replaces Emacs' standard undo feature with a more
powerful yet easier to use version, that treats the undo history
-as what it is: a tree."
+as what it is: a tree.
+
+The following keys are available in `undo-tree-mode':
+
+ \\{undo-tree-map}
+
+Within the undo-tree visualizer, the following keys are available:
+
+ \\{undo-tree-visualizer-map}"
+
nil ; init value
" Undo-Tree" ; lighter
undo-tree-map ; keymap
@@ -1594,6 +1626,16 @@ at POS."
(setq buffer-read-only t))
+(defun undo-tree-visualizer-scroll-left (&optional arg)
+ (interactive "p")
+ (scroll-right (or arg 1) t))
+
+
+(defun undo-tree-visualizer-scroll-right (&optional arg)
+ (interactive "p")
+ (scroll-left (or arg 1) t))
+
+
(provide 'undo-tree)
- [elpa] externals/undo-tree 0bbfa5c 026/195: Tweaked commentary., (continued)
- [elpa] externals/undo-tree 0bbfa5c 026/195: Tweaked commentary., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 86fb076 034/195: Fixed keybindings., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 948386b 035/195: Modified undo-tree-visualizer-active-branch-face, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree bca52bf 042/195: Added undo-tree-mode-lighter customization option, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 50ccefd 043/195: Fixed bug in undo-tree-discard-node., Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree fd3fc5c 046/195: Pass null argument to kill-buffer call in undo-tree-visualizer-quit,, Stefan Monnier, 2020/11/28
- [elpa] externals/undo-tree 45751ef 050/195: Fixed bug in undo-tree-switch-branch., Stefan Monnier, 2020/11/28
- [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 <=
- [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, 2020/11/28
- [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