branch: elpa/magit
commit 7db107c03a1d52f1de3bca4282e3dc9ca2ddeed7
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    Use ## more
---
 lisp/git-commit.el      |  5 ++---
 lisp/magit-apply.el     |  8 +++-----
 lisp/magit-blame.el     |  5 ++---
 lisp/magit-branch.el    | 16 +++++++---------
 lisp/magit-diff.el      |  5 ++---
 lisp/magit-git.el       |  5 ++---
 lisp/magit-gitignore.el |  7 +++----
 lisp/magit-mode.el      | 17 +++++++----------
 lisp/magit-push.el      |  5 ++---
 lisp/magit-remote.el    |  7 +++----
 lisp/magit-section.el   | 21 +++++++++------------
 lisp/magit-sequence.el  |  5 ++---
 lisp/magit-status.el    |  5 ++---
 lisp/magit-transient.el | 12 +++++-------
 14 files changed, 51 insertions(+), 72 deletions(-)

diff --git a/lisp/git-commit.el b/lisp/git-commit.el
index c89abe52a6..206cef889a 100644
--- a/lisp/git-commit.el
+++ b/lisp/git-commit.el
@@ -848,10 +848,9 @@ Save current message first."
 See also manpage git-interpret-trailer(1).  This command does
 not use that Git command, but the initial description still
 serves as a good introduction."
-  [[:description (lambda ()
-                   (cond (prefix-arg
+  [[:description (##cond (prefix-arg
                           "Insert ... by someone ")
-                         ("Insert ... by yourself")))
+                         ("Insert ... by yourself"))
     ("a"   "Ack"          git-commit-ack)
     ("m"   "Modified"     git-commit-modified)
     ("r"   "Reviewed"     git-commit-review)
diff --git a/lisp/magit-apply.el b/lisp/magit-apply.el
index 566c80d1bb..14aa3916e5 100644
--- a/lisp/magit-apply.el
+++ b/lisp/magit-apply.el
@@ -137,11 +137,9 @@ so causes the change to be applied to the index as well."
 (defun magit-apply-diffs (sections &rest args)
   (setq sections (magit-apply--get-diffs sections))
   (magit-apply-patch sections args
-                     (mapconcat
-                      (lambda (s)
-                        (concat (magit-diff-file-header s)
-                                (magit-apply--section-content s)))
-                      sections "")))
+                     (mapconcat (##concat (magit-diff-file-header %)
+                                          (magit-apply--section-content %))
+                                sections "")))
 
 (defun magit-apply-diff (section &rest args)
   (setq section (car (magit-apply--get-diffs (list section))))
diff --git a/lisp/magit-blame.el b/lisp/magit-blame.el
index d6af784917..5695046a18 100644
--- a/lisp/magit-blame.el
+++ b/lisp/magit-blame.el
@@ -757,10 +757,9 @@ modes is toggled, then this mode also gets toggled 
automatically.
 Show the information about the chunk at point in the echo area
 when moving between chunks.  Unlike other blaming commands, do
 not turn on `read-only-mode'."
-  :if (lambda ()
-        (and buffer-file-name
+  :if (##and buffer-file-name
              (or (not magit-blame-mode)
-                 buffer-read-only)))
+                 buffer-read-only))
   (interactive (list (magit-blame-arguments)))
   (when magit-buffer-file-name
     (user-error "Blob buffers aren't supported"))
diff --git a/lisp/magit-branch.el b/lisp/magit-branch.el
index e373c28124..03889aff85 100644
--- a/lisp/magit-branch.el
+++ b/lisp/magit-branch.el
@@ -208,11 +208,10 @@ has to be used to view and change branch related 
variables."
 (transient-define-prefix magit-branch (branch)
   "Add, configure or remove a branch."
   :man-page "git-branch"
-  [:if (lambda () (and magit-branch-direct-configure (transient-scope)))
-   :description
-   (lambda ()
-     (concat (propertize "Configure " 'face 'transient-heading)
-             (propertize (transient-scope) 'face 'magit-branch-local)))
+  [:if (##and magit-branch-direct-configure (transient-scope))
+   :description (##concat
+                 (propertize "Configure " 'face 'transient-heading)
+                 (propertize (transient-scope) 'face 'magit-branch-local))
    ("d" magit-branch.<branch>.description)
    ("u" magit-branch.<branch>.merge/remote)
    ("r" magit-branch.<branch>.rebase)
@@ -854,10 +853,9 @@ and also rename the respective reflog file."
 (transient-define-prefix magit-branch-configure (branch)
   "Configure a branch."
   :man-page "git-branch"
-  [:description
-   (lambda ()
-     (concat (propertize "Configure " 'face 'transient-heading)
-             (propertize (transient-scope) 'face 'magit-branch-local)))
+  [:description (##concat
+                 (propertize "Configure " 'face 'transient-heading)
+                 (propertize (transient-scope) 'face 'magit-branch-local))
    ("d" magit-branch.<branch>.description)
    ("u" magit-branch.<branch>.merge/remote)
    ("r" magit-branch.<branch>.rebase)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index cf1e365d9a..a5444d23c5 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -1423,9 +1423,8 @@ for a revision."
               (magit-diff--goto-position file line col))))))))
 
 (defun magit-diff--locate-hunk (file line &optional parent)
-  (and-let* ((diff (cl-find-if (lambda (section)
-                                 (and (cl-typep section 'magit-file-section)
-                                      (equal (oref section value) file)))
+  (and-let* ((diff (cl-find-if (##and (cl-typep % 'magit-file-section)
+                                      (equal (oref % value) file))
                                (oref (or parent magit-root-section) 
children))))
     (let ((hunks (oref diff children)))
       (cl-block nil
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 4c5ec28029..29e00bf6f2 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -2060,9 +2060,8 @@ SORTBY is a key or list of keys to pass to the `--sort' 
flag of
 
 (defun magit-remote-head (remote)
   (and-let* ((line (cl-find-if
-                    (lambda (line)
-                      (string-match
-                       "\\`ref: refs/heads/\\([^\s\t]+\\)[\s\t]HEAD\\'" line))
+                    (##string-match
+                     "\\`ref: refs/heads/\\([^\s\t]+\\)[\s\t]HEAD\\'" %)
                     (magit-git-lines "ls-remote" "--symref" remote "HEAD"))))
     (match-string 1 line)))
 
diff --git a/lisp/magit-gitignore.el b/lisp/magit-gitignore.el
index 951b0f6cfb..0ee63df0e2 100644
--- a/lisp/magit-gitignore.el
+++ b/lisp/magit-gitignore.el
@@ -42,10 +42,9 @@
    ("p" "privately (.git/info/exclude)"
     magit-gitignore-in-gitdir)
    ("g" magit-gitignore-on-system
-    :if (lambda () (magit-get "core.excludesfile"))
-    :description (lambda ()
-                   (format "privately for all repositories (%s)"
-                           (magit-get "core.excludesfile"))))]
+    :if (##magit-get "core.excludesfile")
+    :description (##format "privately for all repositories (%s)"
+                           (magit-get "core.excludesfile")))]
   ["Skip worktree"
    (7 "w" "do skip worktree"     magit-skip-worktree)
    (7 "W" "do not skip worktree" magit-no-skip-worktree)]
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 9681767b58..15bed5f082 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1131,9 +1131,8 @@ Run hooks `magit-pre-refresh-hook' and 
`magit-post-refresh-hook'."
   (interactive)
   (require (quote elp))
   (cond ((catch 'in-progress
-           (mapatoms (lambda (symbol)
-                       (and (get symbol elp-timer-info-property)
-                            (throw 'in-progress t)))))
+           (mapatoms (##and (get % elp-timer-info-property)
+                            (throw 'in-progress t))))
          (message "Stop profiling and display results...")
          (elp-results)
          (elp-restore-all))
@@ -1209,14 +1208,12 @@ argument (the prefix) non-nil means save all with no 
questions."
   (when-let ((topdir (magit-rev-parse-safe "--show-toplevel")))
     (let ((remote (file-remote-p default-directory))
           (save-some-buffers-action-alist
-           `((?Y (lambda (buffer)
-                   (with-current-buffer buffer
-                     (setq buffer-save-without-query t)
-                     (save-buffer)))
+           `((?Y (##with-current-buffer %
+                   (setq buffer-save-without-query t)
+                   (save-buffer))
                  "to save the current buffer and remember choice")
-             (?N (lambda (buffer)
-                   (with-current-buffer buffer
-                     (setq magit-inhibit-refresh-save t)))
+             (?N (##with-current-buffer %
+                   (setq magit-inhibit-refresh-save t))
                  "to skip the current buffer and remember choice")
              ,@save-some-buffers-action-alist))
           (topdirs nil)
diff --git a/lisp/magit-push.el b/lisp/magit-push.el
index ca90b62d4e..1b8acb4265 100644
--- a/lisp/magit-push.el
+++ b/lisp/magit-push.el
@@ -43,10 +43,9 @@
    ("-T" "Include all tags" "--tags")
    ("-t" "Include related annotated tags" "--follow-tags")]
   [:if magit-get-current-branch
-   :description (lambda ()
-                  (format (propertize "Push %s to" 'face 'transient-heading)
+   :description (##format (propertize "Push %s to" 'face 'transient-heading)
                           (propertize (magit-get-current-branch)
-                                      'face 'magit-branch-local)))
+                                      'face 'magit-branch-local))
    ("p" magit-push-current-to-pushremote)
    ("u" magit-push-current-to-upstream)
    ("e" "elsewhere" magit-push-current)]
diff --git a/lisp/magit-remote.el b/lisp/magit-remote.el
index 77a79a31c4..e4cdab797d 100644
--- a/lisp/magit-remote.el
+++ b/lisp/magit-remote.el
@@ -309,10 +309,9 @@ refspec."
 (transient-define-prefix magit-remote-configure (remote)
   "Configure a remote."
   :man-page "git-remote"
-  [:description
-   (lambda ()
-     (concat (propertize "Configure " 'face 'transient-heading)
-             (propertize (transient-scope) 'face 'magit-branch-remote)))
+  [:description (##concat
+                 (propertize "Configure " 'face 'transient-heading)
+                 (propertize (transient-scope) 'face 'magit-branch-remote))
    ("u" magit-remote.<remote>.url)
    ("U" magit-remote.<remote>.fetch)
    ("s" magit-remote.<remote>.pushurl)
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index a68b728506..5ad9cdd9c8 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -587,10 +587,8 @@ instead of in the one whose root `magit-root-section' is."
                   (pcase-let ((`(,type . ,value) (car ident)))
                     (setq section
                           (cl-find-if
-                           (lambda (section)
-                             (and (eq (oref section type) type)
-                                  (equal (magit-section-ident-value section)
-                                         value)))
+                           (##and (eq (oref % type) type)
+                                  (equal (magit-section-ident-value %) value))
                            (oref section children)))))
         (pop ident))
       section)))
@@ -894,11 +892,11 @@ With a prefix argument also expand it." heading)
      ,@(and (not (plist-member properties :description))
             (list :description heading))
      ,@(and inserter
-            `(:if (lambda () (memq ',inserter
-                              (bound-and-true-p magit-status-sections-hook)))))
-     :inapt-if-not (lambda () (magit-get-section
-                          (cons (cons ',type ,value)
-                                (magit-section-ident magit-root-section))))
+            `(:if (##memq ',inserter
+                          (bound-and-true-p magit-status-sections-hook))))
+     :inapt-if-not (##magit-get-section
+                    (cons (cons ',type ,value)
+                          (magit-section-ident magit-root-section)))
      (interactive "P")
      (if-let ((section (magit-get-section
                         (cons (cons ',type ,value)
@@ -2348,9 +2346,8 @@ This is like moving to POS and then calling `pos-eol'."
                           (magit-section-match magit--imenu-group-types 
section))
                         (and-let* ((children (oref section children)))
                           `((,(magit--imenu-index-name section)
-                             ,@(mapcar (lambda (s)
-                                         (cons (magit--imenu-index-name s)
-                                               (oref s start)))
+                             ,@(mapcar (##cons (magit--imenu-index-name %)
+                                               (oref % start))
                                        children))))))
                   (magit--imenu-item-types
                    (and (magit-section-match magit--imenu-item-types section)
diff --git a/lisp/magit-sequence.el b/lisp/magit-sequence.el
index 87ab203e46..0ad95d774c 100644
--- a/lisp/magit-sequence.el
+++ b/lisp/magit-sequence.el
@@ -547,10 +547,9 @@ This discards all changes made since the sequence started."
    (magit:--gpg-sign)
    (magit:--signoff)]
   [:if-not magit-rebase-in-progress-p
-   :description (lambda ()
-                  (format (propertize "Rebase %s onto" 'face 
'transient-heading)
+   :description (##format (propertize "Rebase %s onto" 'face 
'transient-heading)
                           (propertize (or (magit-get-current-branch) "HEAD")
-                                      'face 'magit-branch-local)))
+                                      'face 'magit-branch-local))
    ("p" magit-rebase-onto-pushremote)
    ("u" magit-rebase-onto-upstream)
    ("e" "elsewhere" magit-rebase-branch)]
diff --git a/lisp/magit-status.el b/lisp/magit-status.el
index ae39a5e381..ff8d458136 100644
--- a/lisp/magit-status.el
+++ b/lisp/magit-status.el
@@ -767,9 +767,8 @@ is always ignored."
     (magit-insert-files
      'untracked
      (lambda (files)
-       (mapcan (lambda (line)
-                 (and (eq (aref line 0) ??)
-                      (list (substring line 3))))
+       (mapcan (##and (eq (aref % 0) ??)
+                      (list (substring % 3)))
                (apply #'magit-git-items "status" "-z" "--porcelain"
                       (format "--untracked-files=%s"
                               (if (eq value 'all) "all" "normal"))
diff --git a/lisp/magit-transient.el b/lisp/magit-transient.el
index aaaca23378..97e26047da 100644
--- a/lisp/magit-transient.el
+++ b/lisp/magit-transient.el
@@ -102,10 +102,9 @@
 (defun magit-transient-read-person (prompt initial-input history)
   (magit-completing-read
    prompt
-   (mapcar (lambda (line)
-             (save-excursion
-               (and (string-match "\\`[\s\t]+[0-9]+\t" line)
-                    (list (substring line (match-end 0))))))
+   (mapcar (##save-excursion
+             (and (string-match "\\`[\s\t]+[0-9]+\t" %)
+                  (list (substring % (match-end 0)))))
            (magit-git-lines "shortlog" "-n" "-s" "-e" "HEAD"))
    nil nil initial-input history))
 
@@ -151,9 +150,8 @@
   (if-let ((value (oref obj value)))
       (if (oref obj multi-value)
           (if (cdr value)
-              (mapconcat (lambda (v)
-                           (concat "\n     "
-                                   (propertize v 'face 'transient-value)))
+              (mapconcat (##concat "\n     "
+                                   (propertize % 'face 'transient-value))
                          value "")
             (propertize (car value) 'face 'transient-value))
         (propertize (car (split-string value "\n"))

Reply via email to