[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] fix/viper-undo 01811de: Limit the scope of the disabled bo
From: |
Phillip Lord |
Subject: |
[Emacs-diffs] fix/viper-undo 01811de: Limit the scope of the disabled boundaries. |
Date: |
Tue, 17 May 2016 08:11:41 +0000 (UTC) |
branch: fix/viper-undo
commit 01811de612e19041f2afcfed78a7744f62fc8dbd
Author: Phillip Lord <address@hidden>
Commit: Phillip Lord <address@hidden>
Limit the scope of the disabled boundaries.
---
lisp/emulation/viper-cmd.el | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 39819a8..0347273 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -293,10 +293,6 @@
;; Change state to NEW-STATE---either emacs-state, vi-state, or insert-state.
(defun viper-change-state (new-state)
- (if (eq new-state 'emacs-state)
- (setq undo-auto-disable-boundaries nil)
- (setq undo-auto-disable-boundaries t))
-
;; Keep viper-post/pre-command-hooks fresh.
;; We remove then add viper-post/pre-command-sentinel since it is very
;; desirable that viper-pre-command-sentinel is the last hook and
@@ -1716,15 +1712,17 @@ invokes the command before that, etc."
;; In VI, unlike Emacs, if you open a line, say, and add a bunch of lines,
;; they are undone all at once.
(defun viper-adjust-undo ()
+ (setq undo-auto-disable-boundaries nil)
(setq viper-undo-needs-adjustment nil)
(setq buffer-undo-list
(cons nil buffer-undo-list)))
(defun viper-set-complex-command-for-undo ()
- (if (not viper-undo-needs-adjustment)
- (setq viper-undo-needs-adjustment t)
- (setq buffer-undo-list
+ (when (not viper-undo-needs-adjustment)
+ (setq undo-auto-disable-boundaries t)
+ (setq viper-undo-needs-adjustment t)
+ (setq buffer-undo-list
(cons nil buffer-undo-list))))
;;; Viper's destructive Command ring utilities
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] fix/viper-undo 01811de: Limit the scope of the disabled boundaries.,
Phillip Lord <=