emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/undo-tree 4e558f8 088/195: Make various interactive com


From: Stefan Monnier
Subject: [elpa] externals/undo-tree 4e558f8 088/195: Make various interactive commands signal an error if buffer is read-only.
Date: Sat, 28 Nov 2020 13:41:28 -0500 (EST)

branch: externals/undo-tree
commit 4e558f89ffc3b96fddd956e096c2ddf0d8641fda
Author: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>
Commit: Toby S. Cubitt <toby-undo-tree@dr-qubit.org>

    Make various interactive commands signal an error if buffer is read-only.
---
 undo-tree.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/undo-tree.el b/undo-tree.el
index d4bb979..aea56ae 100644
--- a/undo-tree.el
+++ b/undo-tree.el
@@ -615,6 +615,7 @@
 ;;   undo state in registers in `undo-tree-save-state-to-register' (and
 ;;   `undo-tree-restore-state-from-register')
 ;; * suppress branch point messages when undo/redoing from `undo-tree-set'
+;; * make various interactive commands signal an error if buffer is read-only
 ;;
 ;; Version 0.3.5
 ;; * improved `undo-tree-switch-branch': display current branch number in
@@ -2532,7 +2533,7 @@ changes within the current region.
 A non-nil PRESERVE-UNDO causes the existing undo record to be
 preserved, rather than replacing it with the new one generated by
 redoing."
-  (interactive "p")
+  (interactive "*P")
   ;; throw error if undo is disabled in buffer
   (when (eq buffer-undo-list t) (error "No undo information in this buffer"))
 
@@ -2710,7 +2711,7 @@ Argument is a character, naming the register."
   "Restore undo-tree state from REGISTER.
 The state must be saved using `undo-tree-save-state-to-register'.
 Argument is a character, naming the register."
-  (interactive "cRestore undo-tree state from register: ")
+  (interactive "*cRestore undo-tree state from register: ")
   ;; throw error if undo is disabled in buffer, or if register doesn't contain
   ;; an undo-tree node
   (let ((data (registerv-data (get-register register))))
@@ -2837,7 +2838,7 @@ signaling an error if file is not found."
 
 (defun undo-tree-visualize ()
   "Visualize the current buffer's undo tree."
-  (interactive)
+  (interactive "*")
   (deactivate-mark)
   ;; throw error if undo is disabled in buffer
   (when (eq buffer-undo-list t) (error "No undo information in this buffer"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]