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

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

[elpa] scratch/add-vdiff ad0e8c3 091/258: Make mirrored-commands private


From: Justin Burkett
Subject: [elpa] scratch/add-vdiff ad0e8c3 091/258: Make mirrored-commands private and rename
Date: Wed, 17 May 2017 08:13:28 -0400 (EDT)

branch: scratch/add-vdiff
commit ad0e8c3a35fbfd5d24954d912d4e4b6d981b0b05
Author: justbur <address@hidden>
Commit: justbur <address@hidden>

    Make mirrored-commands private and rename
---
 README.org | 12 +-----------
 vdiff.el   | 26 ++++++++++++--------------
 2 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/README.org b/README.org
index 286c175..e2ceda7 100644
--- a/README.org
+++ b/README.org
@@ -94,18 +94,8 @@ The current customization options and there defaults are
   ;; break vdiff.
   (setq vdiff-diff-program-args "")
 
-  ;; Commands that should be executed in other vdiff buffer to keep lines in
-  ;; sync. There is no need to include commands that scroll the buffer here,
-  ;; because those are handled differently.
-  (setq vdiff-mirrored-commands '(next-line
-                                  previous-line
-                                  evil-next-line
-                                  evil-previous-line
-                                  beginning-of-buffer
-                                  end-of-buffer))
-
   ;; Unchanged lines to leave unfolded around a fold
-  (setq vdiff-fold-padding 2)
+  (setq vdiff-fold-padding 6)
 
   ;; Minimum number of lines to fold
   (setq vdiff-min-fold-size 4)
diff --git a/vdiff.el b/vdiff.el
index 4cc9c17..e587c43 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -71,18 +71,6 @@ break vdiff. It is empty by default."
   :group 'vdiff
   :type 'string)
 
-(defcustom vdiff-mirrored-commands '(next-line
-                                     previous-line
-                                     evil-next-line
-                                     evil-previous-line
-                                     beginning-of-buffer
-                                     end-of-buffer)
-  "Commands that should be executed in other vdiff buffer to keep
-lines in sync. There is no need to include commands that scroll
-the buffer here, because those are handled differently."
-  :group 'vdiff
-  :type '(repeat symbol))
-
 (defcustom vdiff-fold-padding 6
   "Unchanged lines to leave unfolded around a fold"
   :group 'vdiff
@@ -142,6 +130,16 @@ 
https://www.gnu.org/software/emacs/manual/html_node/elisp/Syntax-Class-Table.htm
   "Face for word changes within a hunk"
   :group 'vdiff)
 
+(defvar vdiff--force-sync-commands '(next-line
+                                     previous-line
+                                     evil-next-line
+                                     evil-previous-line
+                                     beginning-of-buffer
+                                     end-of-buffer)
+  "Commands that should be executed in other vdiff buffer to keep
+lines in sync. There is no need to include commands that scroll
+the buffer here, because those are handled differently.")
+
 (defvar vdiff--buffers nil)
 (defvar vdiff--temp-files nil)
 (defvar vdiff--word-diff-temp-files nil)
@@ -916,10 +914,10 @@ buffer)."
         (set-window-point other-window other-line-pos)))))
 
 (defun vdiff--post-command-hook ()
-  "Sync scroll for `vdiff-mirrored-commands'."
+  "Sync scroll for `vdiff--force-sync-commands'."
   ;; Use real-this-command because evil-next-line and evil-previous-line 
pretend
   ;; they are next-line and previous-line
-  (when (and (memq real-this-command vdiff-mirrored-commands)
+  (when (and (memq real-this-command vdiff--force-sync-commands)
              (not vdiff--in-post-command-hook)
              (vdiff--buffer-p))
     ;; New Strategy: Just force a redisplay in other window and let



reply via email to

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