[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 5068da4 39/42: Reindent
From: |
Dmitry Gutov |
Subject: |
[elpa] master 5068da4 39/42: Reindent |
Date: |
Wed, 09 Sep 2015 19:03:49 +0000 |
branch: master
commit 5068da46753d7f239ff892802d15ad34509c7676
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Reindent
---
diff-hl-flydiff.el | 83 ++++++++++++++++++++++++++-------------------------
diff-hl.el | 18 +++++-----
2 files changed, 51 insertions(+), 50 deletions(-)
diff --git a/diff-hl-flydiff.el b/diff-hl-flydiff.el
index 0c421ce..8ede0b5 100644
--- a/diff-hl-flydiff.el
+++ b/diff-hl-flydiff.el
@@ -73,40 +73,40 @@
(defun diff-hl-flydiff/working-revision (file)
"Like vc-working-revision, but always up-to-date"
(vc-file-setprop file 'vc-working-revision
- (vc-call-backend (vc-backend file) 'working-revision file)))
+ (vc-call-backend (vc-backend file) 'working-revision file)))
(defun diff-hl-flydiff-make-temp-file-name (file rev &optional manual)
"Return a backup file name for REV or the current version of FILE.
If MANUAL is non-nil it means that a name for backups created by
the user should be returned."
(let* ((auto-save-file-name-transforms
- `((".*" ,temporary-file-directory t))))
+ `((".*" ,temporary-file-directory t))))
(expand-file-name
- (concat (make-auto-save-file-name)
- ".~" (subst-char-in-string
- ?/ ?_ rev)
- (unless manual ".") "~")
- temporary-file-directory)))
+ (concat (make-auto-save-file-name)
+ ".~" (subst-char-in-string
+ ?/ ?_ rev)
+ (unless manual ".") "~")
+ temporary-file-directory)))
(defun diff-hl-flydiff-create-revision (file revision)
"Read REVISION of FILE into a buffer and return the buffer."
(let ((automatic-backup (diff-hl-flydiff-make-temp-file-name file revision))
- (filebuf (get-file-buffer file))
- (filename (diff-hl-flydiff-make-temp-file-name file revision
'manual)))
+ (filebuf (get-file-buffer file))
+ (filename (diff-hl-flydiff-make-temp-file-name file revision 'manual)))
(unless (file-exists-p filename)
(if (file-exists-p automatic-backup)
- (rename-file automatic-backup filename nil)
+ (rename-file automatic-backup filename nil)
(with-current-buffer filebuf
(let ((failed t)
- (coding-system-for-read 'no-conversion)
- (coding-system-for-write 'no-conversion))
+ (coding-system-for-read 'no-conversion)
+ (coding-system-for-write 'no-conversion))
(unwind-protect
- (with-temp-file filename
- (let ((outbuf (current-buffer)))
- ;; Change buffer to get local value of
- ;; vc-checkout-switches.
- (with-current-buffer filebuf
- (vc-call find-revision file revision outbuf))))
+ (with-temp-file filename
+ (let ((outbuf (current-buffer)))
+ ;; Change buffer to get local value of
+ ;; vc-checkout-switches.
+ (with-current-buffer filebuf
+ (vc-call find-revision file revision outbuf))))
(setq failed nil)
(when (and failed (file-exists-p filename))
(delete-file filename)))))))
@@ -119,20 +119,21 @@ This requires the external program `diff' to be in your
`exec-path'."
(vc-ensure-vc-buffer)
(with-current-buffer (get-buffer (current-buffer))
(let* ((temporary-file-directory
- (if (file-directory-p "/dev/shm/")
- "/dev/shm/"
- temporary-file-directory))
- (rev (diff-hl-flydiff-create-revision file
- (diff-hl-flydiff/working-revision file))))
+ (if (file-directory-p "/dev/shm/")
+ "/dev/shm/"
+ temporary-file-directory))
+ (rev (diff-hl-flydiff-create-revision
+ file
+ (diff-hl-flydiff/working-revision file))))
(diff-no-select rev (current-buffer) "-U 0 --strip-trailing-cr" 'noasync
- (get-buffer-create " *diff-hl-diff*")))))
+ (get-buffer-create " *diff-hl-diff*")))))
(defun diff-hl-flydiff/update (old-fun &optional auto)
(unless (and auto
- (or
- (= diff-hl-flydiff-modified-tick (buffer-modified-tick))
- (file-remote-p default-directory)
- (not (buffer-modified-p))))
+ (or
+ (= diff-hl-flydiff-modified-tick (buffer-modified-tick))
+ (file-remote-p default-directory)
+ (not (buffer-modified-p))))
(funcall old-fun)))
(defun diff-hl-flydiff/modified-p (state)
@@ -147,19 +148,19 @@ This requires the external program `diff' to be in your
`exec-path'."
:lighter ""
:global t
(if diff-hl-flydiff-mode
- (progn
- (advice-add 'diff-hl-update :around #'diff-hl-flydiff/update)
- (advice-add 'diff-hl-overlay-modified :override #'ignore)
-
- (advice-add 'diff-hl-modified-p :before-until
- #'diff-hl-flydiff/modified-p)
- (advice-add 'diff-hl-changes-buffer :override
- #'diff-hl-flydiff-buffer-with-head)
- (advice-add 'diff-hl-change :after
- #'diff-hl-flydiff/update-modified-tick)
-
- (setq diff-hl-flydiff-timer
- (run-with-idle-timer 0.3 t #'diff-hl-update t)))
+ (progn
+ (advice-add 'diff-hl-update :around #'diff-hl-flydiff/update)
+ (advice-add 'diff-hl-overlay-modified :override #'ignore)
+
+ (advice-add 'diff-hl-modified-p :before-until
+ #'diff-hl-flydiff/modified-p)
+ (advice-add 'diff-hl-changes-buffer :override
+ #'diff-hl-flydiff-buffer-with-head)
+ (advice-add 'diff-hl-change :after
+ #'diff-hl-flydiff/update-modified-tick)
+
+ (setq diff-hl-flydiff-timer
+ (run-with-idle-timer 0.3 t #'diff-hl-update t)))
(advice-remove 'diff-hl-update #'diff-hl-flydiff/update)
(advice-remove 'diff-hl-overlay-modified #'ignore)
diff --git a/diff-hl.el b/diff-hl.el
index 50714b2..ec3d435 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -219,18 +219,18 @@
(defun diff-hl-modified-p (state)
(or (eq state 'edited)
- (and (eq state 'up-to-date)
- ;; VC state is stale in after-revert-hook.
- (or revert-buffer-in-progress-p
- ;; Diffing against an older revision.
- diff-hl-reference-revision))))
+ (and (eq state 'up-to-date)
+ ;; VC state is stale in after-revert-hook.
+ (or revert-buffer-in-progress-p
+ ;; Diffing against an older revision.
+ diff-hl-reference-revision))))
(defun diff-hl-changes-buffer (file backend)
(let ((buf-name " *diff-hl* "))
(diff-hl-with-diff-switches
- (vc-call-backend backend 'diff (list file)
- diff-hl-reference-revision nil
- buf-name))
+ (vc-call-backend backend 'diff (list file)
+ diff-hl-reference-revision nil
+ buf-name))
buf-name))
(defun diff-hl-changes ()
@@ -282,7 +282,7 @@
(let ((hunk-beg (point)))
(while (cl-plusp len)
(diff-hl-add-highlighting
- type
+ type
(cond
((not diff-hl-draw-borders) 'empty)
((and (= len 1) (= line current-line)) 'single)
- [elpa] master 6ab3ebe 30/42: Stop duplicating code in diff-hl-changes, (continued)
- [elpa] master 6ab3ebe 30/42: Stop duplicating code in diff-hl-changes, Dmitry Gutov, 2015/09/09
- [elpa] master 2209370 27/42: Ensure working revisions are never stale, Dmitry Gutov, 2015/09/09
- [elpa] master 15aa2b8 26/42: Fix usage of "ignored", Dmitry Gutov, 2015/09/09
- [elpa] master 2d40373 34/42: Update diff-hl-flydiff/vc-git-mode-line-string as per Emacs master, Dmitry Gutov, 2015/09/09
- [elpa] master a16b225 38/42: One fewer version check, Dmitry Gutov, 2015/09/09
- [elpa] master f300548 33/42: Merge pull request #50 from PythonNut/master, Dmitry Gutov, 2015/09/09
- [elpa] master 7428f4a 37/42: Reduce warnings during byte-compilation; don't error b-c in <24.4, Dmitry Gutov, 2015/09/09
- [elpa] master 418dbc7 32/42: Update docs to reflect new diff-hl-flydiff-mode, Dmitry Gutov, 2015/09/09
- [elpa] master 1558064 35/42: Reword the recent README changes, Dmitry Gutov, 2015/09/09
- [elpa] master 8d313db 36/42: Use --strip-trailing-cr, Dmitry Gutov, 2015/09/09
- [elpa] master 5068da4 39/42: Reindent,
Dmitry Gutov <=
- [elpa] master 7fa7f09 41/42: Bump the version, Dmitry Gutov, 2015/09/09
- [elpa] master e576ee2 40/42: Make diff-hl-flydiff-delay customizable, Dmitry Gutov, 2015/09/09
- [elpa] master a454a24 42/42: Merge commit '7fa7f099c7008d521dbbb57a1546f11535544536' from diff-hl, Dmitry Gutov, 2015/09/09