[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/add-vdiff 6516112 075/258: Minor formatting
From: |
Justin Burkett |
Subject: |
[elpa] scratch/add-vdiff 6516112 075/258: Minor formatting |
Date: |
Wed, 17 May 2017 08:13:26 -0400 (EDT) |
branch: scratch/add-vdiff
commit 651611278522c0e4469984a113dde8d31be435cc
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
Minor formatting
---
vdiff.el | 63 ++++++++++++++++++++++++++++++++++++---------------------------
1 file changed, 36 insertions(+), 27 deletions(-)
diff --git a/vdiff.el b/vdiff.el
index d12022c..b8be4aa 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -23,28 +23,29 @@
;;; Commentary:
-;; A tool like vimdiff for Emacs
+;; A tool like vimdiff for Emacs
;; ** Introduction
-;; vdiff is a diff tool for Emacs that is made to behave like vimdiff, meaning
diff
-;; information is displayed in buffers as you edit them. There are commands for
-;; cycling through the changes detected by =diff= and applying changes from one
-;; buffer to the other.
+;; vdiff is a diff tool for Emacs that is made to behave like vimdiff, meaning
+;; diff information is displayed in buffers as you edit them. There are
commands
+;; for cycling through the changes detected by =diff= and applying changes from
+;; one buffer to the other.
;; ediff is a powerful diff tool built into Emacs, but it works differently. In
-;; ediff you control the diffed buffers through a third control buffer, which
works
-;; great until you want to edit the buffers directly. I prefer the way vimdiff
-;; works, but I am also not necessarily interested in perfectly emulating
-;; vimdiff. vdiff does not assume you use evil-mode, but is compatible with it.
+;; ediff you control the diffed buffers through a third control buffer, which
+;; works great until you want to edit the buffers directly. I prefer the way
+;; vimdiff works, but I am also not necessarily interested in perfectly
+;; emulating vimdiff. vdiff does not assume you use evil-mode, but is
compatible
+;; with it.
-;; vdiff is a work in progress, so use it at your own risk. Contributions are
very
-;; welcome.
+;; vdiff is a work in progress, so use it at your own risk. Contributions are
+;; very welcome.
;; ** Installation and Usage
-;; It will be on MELPA eventually. For now, you have to clone this repository
and
-;; modify =load-path=. Here's an example =use-package= declaration.
+;; It will be on MELPA eventually. For now, you have to clone this repository
+;; and modify =load-path=. Here's an example =use-package= declaration.
;; (use-package vdiff
;; :load-path "path/to/vdiff"
@@ -66,9 +67,9 @@
;; | =C-l= | =vdiff-sync-and-center= | Recenter both buffers at
current line |
;; ** Further customization
-
+
;; The current customization options and there defaults are
-
+
;; ;; Whether to lock scrolling by default when starting vdiff
;; (setq vdiff-lock-scrolling t)
@@ -88,7 +89,7 @@
;; evil-previous-line
;; beginning-of-buffer
;; end-of-buffer))
-;;
+;;
;;; Code:
@@ -350,8 +351,7 @@ text on the first line, and the width of the buffer."
(defun vdiff--add-subtraction-overlay (n-lines)
(let* ((ovr (make-overlay (point) (point))))
- (overlay-put ovr 'before-string
- (vdiff--make-subtraction-string n-lines))
+ (overlay-put ovr 'before-string (vdiff--make-subtraction-string n-lines))
(overlay-put ovr 'vdiff-type 'subtraction)
(overlay-put ovr 'vdiff t)
ovr))
@@ -386,7 +386,9 @@ text on the first line, and the width of the buffer."
"\n")
(concat start
first-line-text
- (make-string (- width (length start) (length first-line-text))
?-)
+ (make-string
+ (- width (length start) (length first-line-text))
+ ?-)
"\n"))))
(defun vdiff--make-fold (buffer range)
@@ -432,10 +434,14 @@ text on the first line, and the width of the buffer."
;; Restore any overlays on same range
(let* ((a-fold (cadr (assoc a-range vdiff--folds)))
(b-fold (caddr (assoc a-range vdiff--folds)))
- (a-beg (vdiff--pos-at-line-beginning (car a-range)
a-buffer))
- (a-end (vdiff--pos-at-line-beginning (cdr a-range)
a-buffer))
- (b-beg (vdiff--pos-at-line-beginning (car b-range)
b-buffer))
- (b-end (vdiff--pos-at-line-beginning (cdr b-range)
b-buffer)))
+ (a-beg (vdiff--pos-at-line-beginning
+ (car a-range) a-buffer))
+ (a-end (vdiff--pos-at-line-beginning
+ (cdr a-range) a-buffer))
+ (b-beg (vdiff--pos-at-line-beginning
+ (car b-range) b-buffer))
+ (b-end (vdiff--pos-at-line-beginning
+ (cdr b-range) b-buffer)))
(move-overlay a-fold a-beg a-end a-buffer)
(move-overlay b-fold b-beg b-end b-buffer)
(push (list a-range a-fold b-fold) new-folds)))
@@ -753,8 +759,9 @@ buffer and center both buffers at this line."
;; (let* ((this-line (line-number-at-pos))
;; (other-line (vdiff--translate-line
;; this-line (vdiff--buffer-b-p)))
- ;; ;; This is necessary to not screw up the cursor column after
calling
- ;; ;; next-line or previous-line again from the other buffer
+ ;; ;; This is necessary to not screw up the cursor column after
+ ;; ;; calling next-line or previous-line again from the other
+ ;; ;; buffer
;; temporary-goal-column)
;; (vdiff--with-other-window
;; (ignore-errors
@@ -975,14 +982,16 @@ commands like `vdiff-files' or `vdiff-buffers'."
(make-temp-file "vdiff--temp-b-")))
(setq cursor-in-non-selected-windows nil)
(add-hook 'after-save-hook #'vdiff-refresh nil t)
- (add-hook 'window-size-change-functions 'vdiff--remove-fold-overlays)
+ (add-hook 'window-size-change-functions
+ 'vdiff--remove-fold-overlays)
(when vdiff-lock-scrolling
(vdiff-scroll-lock-mode 1)))
(t
(vdiff--remove-all-overlays)
(setq cursor-in-non-selected-windows t)
(remove-hook 'after-save-hook #'vdiff-refresh t)
- (remove-hook 'window-size-change-functions
'vdiff--remove-fold-overlays)
+ (remove-hook 'window-size-change-functions
+ 'vdiff--remove-fold-overlays)
(when vdiff-scroll-lock-mode
(vdiff-scroll-lock-mode -1))
(setq vdiff--diff-data nil)
- [elpa] scratch/add-vdiff bc5a9a8 242/258: vdiff-magit: Remove unnecessary local bindings, (continued)
- [elpa] scratch/add-vdiff bc5a9a8 242/258: vdiff-magit: Remove unnecessary local bindings, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff c32fe46 251/258: vdiff: Fix compiler warnings, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 875b0d5 252/258: README: Improve vdiff-magit-popup, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 8a3dff3 254/258: vdiff-magit: Add vdiff-magit-stage-is-2way, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 3a32c4e 255/258: README: Update, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff d4883de 256/258: vdiff-magit: Remove use of camel case names for consistency, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 819ea4b 258/258: Add 'packages/vdiff/' from commit 'f11c7c2eeef33a0b75fe4e025818e7e672c57397', Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 14abb75 078/258: Allow jumping to subtraction overlays, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff a15b0e5 084/258: Move point before closing fold, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 425d50b 085/258: Add vdiff-close-other-folds, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 6516112 075/258: Minor formatting,
Justin Burkett <=
- [elpa] scratch/add-vdiff 968047f 093/258: Change wording in a docstring, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff ad0e8c3 091/258: Make mirrored-commands private and rename, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 309e912 108/258: Refresh automatically on idle after change, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 5b1b342 119/258: Remove duplicated code in vdiff-files, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 750a1bc 124/258: Fix bug in remove-refinements, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff c8cba47 125/258: Fix package, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 83f0788 118/258: Don't make temp files global, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 72fe0fa 130/258: Don't update diff info while sending changes, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff c6e30a2 136/258: Merge pull request #9 from gvol/master, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 53c2a6b 153/258: Fix receiving changes, Justin Burkett, 2017/05/17