[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit c1a9994db6 1/2: Use defun indentation for funct
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit c1a9994db6 1/2: Use defun indentation for function bindings |
Date: |
Thu, 31 Mar 2022 19:58:13 -0400 (EDT) |
branch: elpa/git-commit
commit c1a9994db66f69fe26fa1e03f26619688c877cb6
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Use defun indentation for function bindings
---
lisp/magit-blame.el | 22 +++++++++++-----------
lisp/magit-diff.el | 42 +++++++++++++++++++++---------------------
lisp/magit-extras.el | 10 +++++-----
lisp/magit-margin.el | 16 ++++++++--------
lisp/magit-mode.el | 20 ++++++++++----------
lisp/magit-process.el | 18 +++++++++---------
lisp/magit-status.el | 15 +++++++--------
7 files changed, 71 insertions(+), 72 deletions(-)
diff --git a/lisp/magit-blame.el b/lisp/magit-blame.el
index 1832e60c6b..279098e09d 100644
--- a/lisp/magit-blame.el
+++ b/lisp/magit-blame.el
@@ -679,19 +679,19 @@ modes is toggled, then this mode also gets toggled
automatically.
(magit--format-spec
(propertize format 'font-lock-face face)
(cl-flet* ((p0 (s f)
- (propertize s 'font-lock-face
- (if face
- (if (listp face)
- face
- (list f face))
- f)))
+ (propertize s 'font-lock-face
+ (if face
+ (if (listp face)
+ face
+ (list f face))
+ f)))
(p1 (k f)
- (p0 (cdr (assoc k revinfo)) f))
+ (p0 (cdr (assoc k revinfo)) f))
(p2 (k1 k2 f)
- (p0 (magit-blame--format-time-string
- (cdr (assoc k1 revinfo))
- (cdr (assoc k2 revinfo)))
- f)))
+ (p0 (magit-blame--format-time-string
+ (cdr (assoc k1 revinfo))
+ (cdr (assoc k2 revinfo)))
+ f)))
`((?H . ,(p0 rev 'magit-blame-hash))
(?s . ,(p1 "summary" 'magit-blame-summary))
(?a . ,(p1 "author" 'magit-blame-name))
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index eecfee5b26..ac1ff6803c 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -1423,13 +1423,13 @@ toggle the file restriction in the repository's
revision buffer
instead."
(interactive)
(cl-flet ((toggle ()
- (if (or magit-buffer-diff-files
- magit-buffer-diff-files-suspended)
- (cl-rotatef magit-buffer-diff-files
- magit-buffer-diff-files-suspended)
- (setq magit-buffer-diff-files
- (transient-infix-read 'magit:--)))
- (magit-refresh)))
+ (if (or magit-buffer-diff-files
+ magit-buffer-diff-files-suspended)
+ (cl-rotatef magit-buffer-diff-files
+ magit-buffer-diff-files-suspended)
+ (setq magit-buffer-diff-files
+ (transient-infix-read 'magit:--)))
+ (magit-refresh)))
(cond
((derived-mode-p 'magit-log-mode
'magit-cherry-mode
@@ -3181,13 +3181,13 @@ are highlighted."
(defun magit-diff-tab-width (file)
(setq file (expand-file-name file))
(cl-flet ((cache (value)
- (let ((elt (assoc file magit-diff--tab-width-cache)))
- (if elt
- (setcdr elt value)
- (setq magit-diff--tab-width-cache
- (cons (cons file value)
- magit-diff--tab-width-cache))))
- value))
+ (let ((elt (assoc file magit-diff--tab-width-cache)))
+ (if elt
+ (setcdr elt value)
+ (setq magit-diff--tab-width-cache
+ (cons (cons file value)
+ magit-diff--tab-width-cache))))
+ value))
(cond
((not magit-diff-adjust-tab-width)
tab-width)
@@ -3270,10 +3270,10 @@ are highlighted."
(oref section end)
'diff-mode 'fine))))
(cl-labels ((recurse (section)
- (if (magit-section-match 'hunk section)
- (magit-diff-update-hunk-refinement section)
- (dolist (child (oref section children))
- (recurse child)))))
+ (if (magit-section-match 'hunk section)
+ (magit-diff-update-hunk-refinement section)
+ (dolist (child (oref section children))
+ (recurse child)))))
(recurse magit-root-section))))
@@ -3357,9 +3357,9 @@ last (visual) lines of the region."
(point)))
(color (face-background 'magit-diff-lines-boundary nil t)))
(cl-flet ((ln (b e &rest face)
- (magit-diff--make-hunk-overlay
- b e 'font-lock-face face 'after-string
- (magit-diff--hunk-after-string face))))
+ (magit-diff--make-hunk-overlay
+ b e 'font-lock-face face 'after-string
+ (magit-diff--hunk-after-string face))))
(if (= beg end-bol)
(ln beg beg-eol :overline color :underline color)
(ln beg beg-eol :overline color)
diff --git a/lisp/magit-extras.el b/lisp/magit-extras.el
index 69aba3cb6a..2881ddfab1 100644
--- a/lisp/magit-extras.el
+++ b/lisp/magit-extras.el
@@ -558,11 +558,11 @@ list returned by `magit-rebase-arguments'."
"Type %p on a commit to reshelve it and the commits above it,"))
(t
(cl-flet ((adjust (time offset)
- (format-time-string
- "%F %T %z"
- (+ (floor time)
- (* offset 60)
- (- (car (decode-time time)))))))
+ (format-time-string
+ "%F %T %z"
+ (+ (floor time)
+ (* offset 60)
+ (- (car (decode-time time)))))))
(let* ((start (concat rev "^"))
(range (concat start ".." current))
(time-rev (adjust (float-time (string-to-number
diff --git a/lisp/magit-margin.el b/lisp/magit-margin.el
index ae0c310880..5f092da362 100644
--- a/lisp/magit-margin.el
+++ b/lisp/magit-margin.el
@@ -223,14 +223,14 @@ English.")
(defun magit--age (date &optional abbreviate)
(cl-labels ((fn (age spec)
- (pcase-let ((`(,char ,unit ,units ,weight) (car spec)))
- (let ((cnt (round (/ age weight 1.0))))
- (if (or (not (cdr spec))
- (>= (/ age weight) 1))
- (list cnt (cond (abbreviate char)
- ((= cnt 1) unit)
- (t units)))
- (fn age (cdr spec)))))))
+ (pcase-let ((`(,char ,unit ,units ,weight) (car spec)))
+ (let ((cnt (round (/ age weight 1.0))))
+ (if (or (not (cdr spec))
+ (>= (/ age weight) 1))
+ (list cnt (cond (abbreviate char)
+ ((= cnt 1) unit)
+ (t units)))
+ (fn age (cdr spec)))))))
(fn (abs (- (float-time)
(if (stringp date)
(string-to-number date)
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index c05822bf27..b937f10969 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -866,18 +866,18 @@ If `selected' or t, then only consider buffers on the
selected
If a frame, then only consider buffers on that frame."
(if-let ((topdir (magit-toplevel)))
(cl-flet* ((b (buffer)
- (with-current-buffer buffer
- (and (eq major-mode mode)
- (equal magit--default-directory topdir)
- (if value
- (and magit-buffer-locked-p
- (equal (magit-buffer-value) value))
- (not magit-buffer-locked-p))
- buffer)))
+ (with-current-buffer buffer
+ (and (eq major-mode mode)
+ (equal magit--default-directory topdir)
+ (if value
+ (and magit-buffer-locked-p
+ (equal (magit-buffer-value) value))
+ (not magit-buffer-locked-p))
+ buffer)))
(w (window)
- (b (window-buffer window)))
+ (b (window-buffer window)))
(f (frame)
- (seq-some #'w (window-list frame 'no-minibuf))))
+ (seq-some #'w (window-list frame 'no-minibuf))))
(pcase-exhaustive frame
(`nil (seq-some #'b (buffer-list)))
(`all (seq-some #'f (frame-list)))
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index ced3acc894..651316665a 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -1024,15 +1024,15 @@ If STR is supplied, it replaces the `mode-line-process'
text."
(let ((repokey (magit-repository-local-repository)))
;; The following closure captures the repokey value, and is
;; added to `pre-command-hook'.
- (cl-labels ((enable-magit-process-unset-mode-line
- () ;;; Remove ourself from the hook variable, so
- ;;; that we only run once.
- (remove-hook 'pre-command-hook
- #'enable-magit-process-unset-mode-line)
- ;; Clear the inhibit flag for the repository in
- ;; which we set it.
- (magit-repository-local-set
- 'inhibit-magit-process-unset-mode-line nil repokey)))
+ (cl-labels ((enable-magit-process-unset-mode-line ()
+ ;; Remove ourself from the hook variable, so
+ ;; that we only run once.
+ (remove-hook 'pre-command-hook
+ #'enable-magit-process-unset-mode-line)
+ ;; Clear the inhibit flag for the repository in
+ ;; which we set it.
+ (magit-repository-local-set
+ 'inhibit-magit-process-unset-mode-line nil repokey)))
;; Set the inhibit flag until the next command is invoked.
(magit-repository-local-set
'inhibit-magit-process-unset-mode-line t repokey)
diff --git a/lisp/magit-status.el b/lisp/magit-status.el
index 1a8d4773a6..d7a9a10090 100644
--- a/lisp/magit-status.el
+++ b/lisp/magit-status.el
@@ -666,14 +666,13 @@ arguments are for internal use only."
(when (or this-tag next-tag)
(magit-insert-section (tag (or this-tag next-tag))
(insert (format "%-10s" (if both-tags "Tags: " "Tag: ")))
- (cl-flet ((insert-count
- (tag count face)
- (insert (concat (propertize tag 'font-lock-face 'magit-tag)
- (and (> count 0)
- (format " (%s)"
- (propertize
- (format "%s" count)
- 'font-lock-face face)))))))
+ (cl-flet ((insert-count (tag count face)
+ (insert (concat (propertize tag 'font-lock-face 'magit-tag)
+ (and (> count 0)
+ (format " (%s)"
+ (propertize
+ (format "%s" count)
+ 'font-lock-face face)))))))
(when this-tag (insert-count this-tag this-cnt 'magit-branch-local))
(when both-tags (insert ", "))
(when next-tag (insert-count next-tag next-cnt 'magit-tag)))