branch: elpa/magit
commit 594723c6391fb1320a1a80d688edda7c96803f16
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    Use Cond-Let's implementation of and-let
    
    Using the "other elements of VARLIST have access to SYMBOLs from
    earlier elements" variant is IMHO _wrong_ when there are in fact
    no other elements.
---
 lisp/git-rebase.el      |  2 +-
 lisp/magit-branch.el    |  4 +--
 lisp/magit-commit.el    |  4 +--
 lisp/magit-diff.el      | 29 +++++++++---------
 lisp/magit-dired.el     |  6 ++--
 lisp/magit-git.el       | 79 ++++++++++++++++++++++++-------------------------
 lisp/magit-gitignore.el |  2 +-
 lisp/magit-log.el       | 10 +++----
 lisp/magit-mode.el      | 18 +++++------
 lisp/magit-notes.el     | 18 +++++------
 lisp/magit-patch.el     |  4 +--
 lisp/magit-process.el   |  2 +-
 lisp/magit-pull.el      |  2 +-
 lisp/magit-push.el      |  2 +-
 lisp/magit-refs.el      | 10 +++----
 lisp/magit-repos.el     | 16 +++++-----
 lisp/magit-section.el   | 58 ++++++++++++++++++------------------
 lisp/magit-sequence.el  | 18 +++++------
 lisp/magit-status.el    |  2 +-
 lisp/magit-transient.el |  2 +-
 lisp/magit-wip.el       |  8 ++---
 lisp/magit.el           |  4 +--
 22 files changed, 149 insertions(+), 151 deletions(-)

diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el
index 8681e9d1c15..dc7c6d0ed93 100644
--- a/lisp/git-rebase.el
+++ b/lisp/git-rebase.el
@@ -372,7 +372,7 @@ BATCH also ignores commented lines."
                               git-rebase-line-regexps)))
         (git-rebase-action
          :action-type    type
-         :action         (and-let* ((action (match-str 1)))
+         :action         (and-let ((action (match-str 1)))
                            (or (cdr (assoc action git-rebase-short-options))
                                action))
          :action-options (match-str 2)
diff --git a/lisp/magit-branch.el b/lisp/magit-branch.el
index 29d8e17cdba..641545515de 100644
--- a/lisp/magit-branch.el
+++ b/lisp/magit-branch.el
@@ -787,8 +787,8 @@ the remote."
                  (or (not (eq magit-branch-rename-push-target 'forge-only))
                      (and (require (quote forge) nil t)
                           (fboundp 'forge--split-forge-url)
-                          (and-let* ((url (magit-git-string
-                                           "remote" "get-url" remote)))
+                          (and-let ((url (magit-git-string
+                                          "remote" "get-url" remote)))
                             (forge--split-forge-url url)))))
         (let ((old-target (magit-get-push-branch old t))
               (new-target (magit-get-push-branch new t))
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el
index e8607c04f0c..1dfc6bf5919 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -707,8 +707,8 @@ an alternative implementation."
     (cond
      ((not
        (and (eq this-command 'magit-diff-while-committing)
-            (and-let* ((buf (magit-get-mode-buffer
-                             'magit-diff-mode nil 'selected)))
+            (and-let ((buf (magit-get-mode-buffer
+                            'magit-diff-mode nil 'selected)))
               (and (equal rev (buffer-local-value 'magit-buffer-range buf))
                    (equal arg (buffer-local-value 'magit-buffer-typearg 
buf)))))))
      ((eq command 'magit-commit-amend)
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index 0fc268528ee..bf676a8ca6e 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -1175,10 +1175,9 @@ The information can be in three forms:
 
 If no DWIM context is found, nil is returned."
   (cond
-   ((and-let* ((commits (magit-region-values '(commit branch) t)))
-      (progn
-        (deactivate-mark)
-        (concat (car (last commits)) ".." (car commits)))))
+   ((and-let ((commits (magit-region-values '(commit branch) t)))
+      (prog1 (concat (car (last commits)) ".." (car commits))
+        (deactivate-mark))))
    (magit-buffer-refname
     (cons 'commit magit-buffer-refname))
    ((derived-mode-p 'magit-stash-mode)
@@ -1763,7 +1762,7 @@ the Magit-Status buffer for DIRECTORY."
           (list new-rev new-file))))
 
 (defun magit-diff-visit--position (buffer rev file goto-from goto-file)
-  (and-let* ((hunk (magit-diff--hunk-section)))
+  (and-let ((hunk (magit-diff--hunk-section)))
     (let* ((line   (magit-diff-hunk-line   hunk goto-from))
            (column (magit-diff-hunk-column hunk goto-from)))
       (with-current-buffer buffer
@@ -2256,7 +2255,7 @@ keymap is the parent of their keymaps."
 
 (defun magit-diff-use-window-width-as-stat-width ()
   "Use the `window-width' as the value of `--stat-width'."
-  (and-let* ((window (get-buffer-window (current-buffer) 'visible)))
+  (and-let ((window (get-buffer-window (current-buffer) 'visible)))
     (list (format "--stat-width=%d" (window-width window)))))
 
 (defun magit-diff-wash-diffs (args &optional limit)
@@ -2894,8 +2893,8 @@ or a ref which is not a branch, then it inserts nothing."
   "Insert headers about the commit into a revision buffer."
   (magit-insert-section (headers)
     (magit-insert-heading nil
-      (and-let* ((string (magit-rev-format "%D" magit-buffer-revision
-                                           "--decorate=full")))
+      (and-let ((string (magit-rev-format "%D" magit-buffer-revision
+                                          "--decorate=full")))
         (concat (magit-format-ref-labels string) " "))
       (propertize
        (magit-rev-parse (magit--rev-dereference magit-buffer-revision))
@@ -3089,9 +3088,9 @@ It the SECTION has a different type, then do nothing."
 (cl-defmethod magit-section-goto-successor ((section magit-hunk-section)
                                             line char &optional arg)
   (or (magit-section-goto-successor--same section line char)
-      (and-let* ((parent (magit-get-section
-                          (magit-section-ident
-                           (oref section parent)))))
+      (and-let ((parent (magit-get-section
+                         (magit-section-ident
+                          (oref section parent)))))
         (let* ((children (oref parent children))
                (siblings (magit-section-siblings section 'prev))
                (previous (nth (length siblings) children)))
@@ -3249,7 +3248,7 @@ actually a `diff' but a `diffstat' section."
     (when (and section
                (or (not strict)
                    (and (not (eq (magit-diff-type section) 'untracked))
-                        (not (eq (and-let* ((parent (oref section parent)))
+                        (not (eq (and-let ((parent (oref section parent)))
                                    (oref parent type))
                                  'diffstat)))))
       (pcase (list (oref section type)
@@ -3289,7 +3288,7 @@ actually a `diff' but a `diffstat' section."
       (pcase scope
         ('hunk section)
         ('file (first-hunk section))
-        ('list (and-let* ((first-file (car (oref section children))))
+        ('list (and-let ((first-file (car (oref section children))))
                  (first-hunk first-file)))
         ('module nil)))))
 
@@ -3380,9 +3379,9 @@ actually a `diff' but a `diffstat' section."
     (cond
      ((not magit-diff-adjust-tab-width)
       tab-width)
-     ((and-let* ((buffer (find-buffer-visiting file)))
+     ((and-let ((buffer (find-buffer-visiting file)))
         (cache (buffer-local-value 'tab-width buffer))))
-     ((and-let* ((elt (assoc file magit-diff--tab-width-cache)))
+     ((and-let ((elt (assoc file magit-diff--tab-width-cache)))
         (or (cdr elt)
             tab-width)))
      ((or (eq magit-diff-adjust-tab-width 'always)
diff --git a/lisp/magit-dired.el b/lisp/magit-dired.el
index 2f55fbddfc7..f3e91527b30 100644
--- a/lisp/magit-dired.el
+++ b/lisp/magit-dired.el
@@ -40,9 +40,9 @@ With a prefix argument, visit in another window.  If there
 is no file at point, then instead visit `default-directory'."
   (interactive "P")
   (dired-jump other-window
-              (and-let* ((file (if (derived-mode-p 'magit-repolist-mode)
-                                   (tabulated-list-get-id)
-                                 (magit-file-at-point))))
+              (and-let ((file (if (derived-mode-p 'magit-repolist-mode)
+                                  (tabulated-list-get-id)
+                                (magit-file-at-point))))
                 (expand-file-name (if (file-directory-p file)
                                       (file-name-as-directory file)
                                     file)))))
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 87a8b107b64..b88648125a5 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -103,7 +103,7 @@ successfully.")
   (or (and (eq system-type 'windows-nt)
            ;; Avoid the wrappers "cmd/git.exe" and "cmd/git.cmd",
            ;; which are much slower than using "bin/git.exe" directly.
-           (and-let* ((exec (executable-find "git")))
+           (and-let ((exec (executable-find "git")))
              (ignore-errors
                ;; Git for Windows 2.x provides cygpath so we can
                ;; ask it for native paths.
@@ -821,7 +821,7 @@ Also see `magit-git-config-p'."
 (defun magit-git-dir (&optional path)
   "Like (expand-file-name PATH (magit-gitdir)) or just (magit-gitdir)."
   (declare (obsolete magit-gitdir "Magit 4.0.0"))
-  (and-let* ((dir (magit-gitdir)))
+  (and-let ((dir (magit-gitdir)))
     (if path
         (expand-file-name (convert-standard-filename path) dir)
       dir)))
@@ -1186,7 +1186,7 @@ range.  Otherwise, it can be any revision or range 
accepted by
 Return nil, if FILE appears neither in REV nor OTHER-REV,
 or if no rename is detected."
   (or (car (member file (magit-revision-files rev)))
-      (and-let* ((renamed (magit-renamed-files rev other-rev)))
+      (and-let ((renamed (magit-renamed-files rev other-rev)))
         (car (rassoc file renamed)))))
 
 (defun magit-file-status (&rest args)
@@ -1345,7 +1345,7 @@ are considered."
 (defun magit-ignore-submodules-p (&optional return-argument)
   (or (cl-find-if (##string-prefix-p "--ignore-submodules" %)
                   magit-buffer-diff-args)
-      (and-let* ((value (magit-get "diff.ignoreSubmodules")))
+      (and-let ((value (magit-get "diff.ignoreSubmodules")))
         (if return-argument
             (concat "--ignore-submodules=" value)
           (concat "diff.ignoreSubmodules=" value)))))
@@ -1453,7 +1453,7 @@ Git."
                     rev))
 
 (defun magit-rev-branch (rev)
-  (and-let* ((name (magit-rev-name rev "refs/heads/*")))
+  (and-let ((name (magit-rev-name rev "refs/heads/*")))
     (and (not (string-match-p "[~^]" name)) name)))
 
 (defun magit-rev-fixup-target (rev)
@@ -1484,16 +1484,16 @@ Git."
                    (magit-name-remote-branch rev t)))))
 
 (defun magit-name-local-branch (rev &optional lax)
-  (and-let* ((name (magit-rev-name rev "refs/heads/*")))
+  (and-let ((name (magit-rev-name rev "refs/heads/*")))
     (and (or lax (not (string-match-p "[~^]" name))) name)))
 
 (defun magit-name-remote-branch (rev &optional lax)
-  (and-let* ((name (magit-rev-name rev "refs/remotes/*")))
+  (and-let ((name (magit-rev-name rev "refs/remotes/*")))
     (and (or lax (not (string-match-p "[~^]" name)))
          (substring name 8))))
 
 (defun magit-name-tag (rev &optional lax)
-  (and-let* ((name (magit-rev-name rev "refs/tags/*")))
+  (and-let ((name (magit-rev-name rev "refs/tags/*")))
     (progn
       (when (string-suffix-p "^0" name)
         (setq name (substring name 0 -2)))
@@ -1575,7 +1575,7 @@ to, or to some other symbolic-ref that points to the same 
ref."
            (memq (get-text-property (magit-point) 'font-lock-face)
                  (list 'magit-branch-local
                        'magit-branch-current))
-           (and-let* ((branch (magit-thing-at-point 'git-revision t)))
+           (and-let ((branch (magit-thing-at-point 'git-revision t)))
              (cdr (magit-split-branch-name branch))))
       (and (not (eq type 'local))
            (memq (get-text-property (magit-point) 'font-lock-face)
@@ -1602,9 +1602,9 @@ to, or to some other symbolic-ref that points to the same 
ref."
 (defun magit-commit-at-point ()
   (or (magit-section-value-if 'commit)
       (magit-thing-at-point 'git-revision t)
-      (and-let* ((chunk (and (bound-and-true-p magit-blame-mode)
-                             (fboundp 'magit-current-blame-chunk)
-                             (magit-current-blame-chunk))))
+      (and-let ((chunk (and (bound-and-true-p magit-blame-mode)
+                            (fboundp 'magit-current-blame-chunk)
+                            (magit-current-blame-chunk))))
         (oref chunk orig-rev))
       (and (derived-mode-p 'magit-stash-mode
                            'magit-merge-preview-mode
@@ -1627,9 +1627,9 @@ to, or to some other symbolic-ref that points to the same 
ref."
          (magit-ref-abbrev
           (replace-regexp-in-string "\\.\\.\\.?" "" (oref it value)))))
       (magit-thing-at-point 'git-revision t)
-      (and-let* ((chunk (and (bound-and-true-p magit-blame-mode)
-                             (fboundp 'magit-current-blame-chunk)
-                             (magit-current-blame-chunk))))
+      (and-let ((chunk (and (bound-and-true-p magit-blame-mode)
+                            (fboundp 'magit-current-blame-chunk)
+                            (magit-current-blame-chunk))))
         (oref chunk orig-rev))
       (and magit-buffer-file-name
            magit-buffer-refname)
@@ -1735,7 +1735,7 @@ if any, nil otherwise.  If the upstream is not 
configured, the
 configured remote is an url, or the named branch does not exist,
 then return nil.  I.e.,  return an existing local or
 remote-tracking branch ref."
-  (and-let* ((branch (or branch (magit-get-current-branch))))
+  (and-let ((branch (or branch (magit-get-current-branch))))
     (magit-ref-fullname (concat branch "@{upstream}"))))
 
 (defun magit-get-upstream-branch (&optional branch)
@@ -1815,10 +1815,10 @@ according to the branch type."
         (magit--propertize-face remote 'magit-branch-remote))))
 
 (defun magit-get-push-remote (&optional branch)
-  (and-let* ((remote
-              (or (and (or branch (setq branch (magit-get-current-branch)))
-                       (magit-get "branch" branch "pushRemote"))
-                  (magit-get "remote.pushDefault"))))
+  (and-let ((remote
+             (or (and (or branch (setq branch (magit-get-current-branch)))
+                      (magit-get "branch" branch "pushRemote"))
+                 (magit-get "remote.pushDefault"))))
     (magit--propertize-face remote 'magit-branch-remote)))
 
 (defun magit-get-push-branch (&optional branch verify)
@@ -1846,7 +1846,7 @@ according to the branch type."
 
 (defun magit-get-some-remote (&optional branch)
   (or (magit-get-remote branch)
-      (and-let* ((main (magit-main-branch)))
+      (and-let ((main (magit-main-branch)))
         (magit-get-remote main))
       (magit-primary-remote)
       (car (magit-list-remotes))))
@@ -1894,14 +1894,14 @@ as into its upstream."
        (if (eq target t)
            (delete (magit-name-local-branch branch)
                    (magit-list-containing-branches branch))
-         (and-let* ((target (or target (magit-get-current-branch))))
+         (and-let ((target (or target (magit-get-current-branch))))
            (magit-rev-ancestor-p branch target)))))
 
 (defun magit-get-tracked (refname)
   "Return the remote branch tracked by the remote-tracking branch REFNAME.
 The returned value has the form (REMOTE . REF), where REMOTE is
 the name of a remote and REF is the ref local to the remote."
-  (and-let* ((ref (magit-ref-fullname refname)))
+  (and-let ((ref (magit-ref-fullname refname)))
     (save-match-data
       (seq-some (lambda (line)
                   (and (string-match "\
@@ -1938,9 +1938,9 @@ If optional WITH-DISTANCE is non-nil then return (TAG 
COMMITS),
 if it is `dirty' return (TAG COMMIT DIRTY).  COMMITS is the number
 of commits in `HEAD' but not in TAG and DIRTY is t if there are
 uncommitted changes, nil otherwise."
-  (and-let* ((str (magit-git-str "describe" "--long" "--tags"
-                                 (and (eq with-distance 'dirty) "--dirty")
-                                 rev)))
+  (and-let ((str (magit-git-str "describe" "--long" "--tags"
+                                (and (eq with-distance 'dirty) "--dirty")
+                                rev)))
     (save-match-data
       (string-match
        "\\(.+\\)-\\(?:0[0-9]*\\|\\([0-9]+\\)\\)-g[0-9a-z]+\\(-dirty\\)?$" str)
@@ -1958,7 +1958,7 @@ If no such tag can be found or if the distance is 0 (in 
which
 case it is the current tag, not the next), return nil instead.
 If optional WITH-DISTANCE is non-nil, then return (TAG COMMITS)
 where COMMITS is the number of commits in TAG but not in REV."
-  (and-let* ((str (magit-git-str "describe" "--contains" (or rev "HEAD"))))
+  (and-let ((str (magit-git-str "describe" "--contains" (or rev "HEAD"))))
     (save-match-data
       (when (string-match "^[^^~]+" str)
         (setq str (match-str 0 str))
@@ -2025,7 +2025,7 @@ When nil, use `magit-list-refs-sortby'.  If both are nil, 
use
   (magit-list-related-branches "--no-merged" rev args))
 
 (defun magit-list-unmerged-to-upstream-branches ()
-  (seq-filter (##and-let* ((upstream (magit-get-upstream-branch %)))
+  (seq-filter (##and-let ((upstream (magit-get-upstream-branch %)))
                 (member % (magit-list-unmerged-branches upstream)))
               (magit-list-local-branch-names)))
 
@@ -2107,10 +2107,10 @@ When nil, use `magit-list-refs-sortby'.  If both are 
nil, use
             (magit-git-lines "ls-remote" remote)))
 
 (defun magit-remote-head (remote)
-  (and-let* ((line (cl-find-if
-                    (##string-match
-                     "\\`ref: refs/heads/\\([^\s\t]+\\)[\s\t]HEAD\\'" %)
-                    (magit-git-lines "ls-remote" "--symref" remote "HEAD"))))
+  (and-let ((line (cl-find-if
+                   (##string-match
+                    "\\`ref: refs/heads/\\([^\s\t]+\\)[\s\t]HEAD\\'" %)
+                   (magit-git-lines "ls-remote" "--symref" remote "HEAD"))))
     (match-str 1 line)))
 
 (defun magit-list-modified-modules ()
@@ -2306,7 +2306,7 @@ If `first-parent' is set, traverse only first parents."
                              "--not" rev)))
 
 (defun magit-commit-parents (rev)
-  (and-let* ((str (magit-git-string "rev-list" "-1" "--parents" rev)))
+  (and-let ((str (magit-git-string "rev-list" "-1" "--parents" rev)))
     (cdr (split-string str))))
 
 (defun magit-patch-id (rev)
@@ -2337,7 +2337,7 @@ If `first-parent' is set, traverse only first parents."
                     "--"))
 
 (defun magit-format-rev-summary (rev)
-  (and-let* ((str (magit-rev-format "%h %s" rev)))
+  (and-let ((str (magit-rev-format "%h %s" rev)))
     (progn
       (magit--put-face 0 (string-match " " str) 'magit-hash str)
       str)))
@@ -2523,7 +2523,7 @@ and this option only controls what face is used.")
       (setq end (magit--abbrev-if-hash end)))
     (pcase sep
       (".."  (cons beg end))
-      ("..." (and-let* ((base (magit-git-string "merge-base" beg end)))
+      ("..." (and-let ((base (magit-git-string "merge-base" beg end)))
                (cons (if abbrev (magit-rev-abbrev base) base)
                      end))))))
 
@@ -2668,10 +2668,9 @@ and this option only controls what face is used.")
 (defun magit-read-range-or-commit (prompt &optional secondary-default)
   (magit-read-range
    prompt
-   (or (and-let* ((revs (magit-region-values '(commit branch) t)))
-         (progn
-           (deactivate-mark)
-           (concat (car (last revs)) ".." (car revs))))
+   (or (and-let ((revs (magit-region-values '(commit branch) t)))
+         (prog1 (concat (car (last revs)) ".." (car revs))
+           (deactivate-mark)))
        (magit-branch-or-commit-at-point)
        secondary-default
        (magit-get-current-branch))))
@@ -2806,7 +2805,7 @@ out.  Only existing branches can be selected."
      (or (let ((r (car (member (magit-remote-branch-at-point) branches)))
                (l (car (member (magit-local-branch-at-point) branches))))
            (if magit-prefer-remote-upstream (or r l) (or l r)))
-         (and-let* ((main (magit-main-branch)))
+         (and-let ((main (magit-main-branch)))
            (let ((r (car (member (concat "origin/" main) branches)))
                  (l (car (member main branches))))
              (if magit-prefer-remote-upstream (or r l) (or l r))))
diff --git a/lisp/magit-gitignore.el b/lisp/magit-gitignore.el
index 7af73f967e0..9bf0bfa0eda 100644
--- a/lisp/magit-gitignore.el
+++ b/lisp/magit-gitignore.el
@@ -118,7 +118,7 @@ Rules that are defined in that file affect all local 
repositories."
            (mapcan
             (lambda (file)
               (cons (concat "/" file)
-                    (and-let* ((ext (file-name-extension file)))
+                    (and-let ((ext (file-name-extension file)))
                       (list (concat "/" (file-name-directory file) "*." ext)
                             (concat "*." ext)))))
             (sort (nconc
diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index 237e3410e1a..a342d7d3ed5 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -650,7 +650,7 @@ commits before and half after."
   "SPC" #'self-insert-command)
 
 (defun magit-log-read-revs (&optional use-current)
-  (or (and use-current (and-let* ((buf (magit-get-current-branch))) (list 
buf)))
+  (or (and use-current (and-let ((buf (magit-get-current-branch))) (list buf)))
       (let ((crm-separator "\\(\\.\\.\\.?\\|[, ]\\)")
             (crm-local-completion-map magit-log-read-revs-map))
         (split-string (magit-completing-read-multiple
@@ -908,8 +908,8 @@ limit.  Otherwise set it to 256."
   (magit-refresh))
 
 (defun magit-log-get-commit-limit (&optional args)
-  (and-let* ((str (seq-find (##string-match "^-n\\([0-9]+\\)?$" %)
-                            (or args magit-buffer-log-args))))
+  (and-let ((str (seq-find (##string-match "^-n\\([0-9]+\\)?$" %)
+                           (or args magit-buffer-log-args))))
     (string-to-number (match-str 1 str))))
 
 ;;;; Mode Commands
@@ -962,13 +962,13 @@ of the current repository first; creating it if 
necessary."
           "In log, jump to"
           (magit-list-refnames nil t)
           nil 'any nil 'magit-revision-history
-          (or (and-let* ((rev (magit-commit-at-point)))
+          (or (and-let ((rev (magit-commit-at-point)))
                 (magit-rev-fixup-target rev))
               (magit-get-current-branch)))))
   (with-current-buffer
       (cond ((derived-mode-p 'magit-log-mode)
              (current-buffer))
-            ((and-let* ((buf (magit-get-mode-buffer 'magit-log-mode)))
+            ((and-let ((buf (magit-get-mode-buffer 'magit-log-mode)))
                (pop-to-buffer-same-window buf)))
             (t
              (apply #'magit-log-all-branches (magit-log-arguments))))
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index a477d680c26..7d911924d05 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1130,11 +1130,11 @@ The arguments are for internal use."
          (lambda (window)
            (with-selected-window window
              (with-current-buffer buffer
-               (and-let* ((section (magit-section-at)))
+               (and-let ((section (magit-section-at)))
                  `((,window
                     ,section
                     ,@(magit-section-get-relative-position section)
-                    ,@(and-let* ((ws (magit-section-at (window-start))))
+                    ,@(and-let ((ws (magit-section-at (window-start))))
                         (list ws
                               (car (magit-section-get-relative-position ws))
                               (window-start)))))))))
@@ -1142,7 +1142,7 @@ The arguments are for internal use."
          ;; each window displaying the buffer).  The selected window
          ;; comes first in this list, but we want to process it last.
          (nreverse (get-buffer-window-list buffer nil t))))
-      (and-let* ((section (magit-section-at)))
+      (and-let ((section (magit-section-at)))
         `((nil ,section ,@(magit-section-get-relative-position section))))))
 
 (defun magit--refresh-buffer-set-positions (positions)
@@ -1291,9 +1291,9 @@ argument (the prefix) non-nil means save all with no 
questions."
              ;; a repository, and a let-binding is in effect, which
              ;; places us in another repository, then this binding
              ;; is needed to prevent that file from being saved.
-             (and-let* ((default-directory
-                         (and buffer-file-name
-                              (file-name-directory buffer-file-name))))
+             (and-let ((default-directory
+                        (and buffer-file-name
+                             (file-name-directory buffer-file-name))))
                (and
                 ;; Check whether the repository still exists.
                 (file-exists-p default-directory)
@@ -1467,9 +1467,9 @@ Return a (KEY . VALUE) cons cell.
 The KEY is matched using `equal'.
 
 Unless specified, REPOSITORY is the current buffer's repository."
-  (and-let* ((cache (assoc (or repository
-                               (magit-repository-local-repository))
-                           magit-repository-local-cache)))
+  (and-let ((cache (assoc (or repository
+                              (magit-repository-local-repository))
+                          magit-repository-local-cache)))
     (assoc key (cdr cache))))
 
 (defun magit-repository-local-get (key &optional default repository)
diff --git a/lisp/magit-notes.el b/lisp/magit-notes.el
index 6ad91fc25ab..d43be85ff58 100644
--- a/lisp/magit-notes.el
+++ b/lisp/magit-notes.el
@@ -164,13 +164,13 @@ Also see `magit-notes-merge'."
 ;;; Readers
 
 (defun magit-notes-read-ref (prompt &optional _initial-input history)
-  (and-let* ((ref (magit-completing-read
-                   prompt (magit-list-notes-refnames) nil t
-                   (and-let* ((def (magit-get "core.notesRef")))
-                     (if (string-prefix-p "refs/notes/" def)
-                         (substring def 11)
-                       def))
-                   history)))
+  (and-let ((ref (magit-completing-read
+                  prompt (magit-list-notes-refnames) nil t
+                  (and-let ((def (magit-get "core.notesRef")))
+                    (if (string-prefix-p "refs/notes/" def)
+                        (substring def 11)
+                      def))
+                  history)))
     (if (string-prefix-p "refs/" ref)
         ref
       (concat "refs/notes/" ref))))
@@ -192,8 +192,8 @@ Also see `magit-notes-merge'."
 
 (defun magit-notes-read-args (prompt)
   (list (magit-read-branch-or-commit prompt (magit-stash-at-point))
-        (and-let* ((str (seq-find (##string-match "^--ref=\\(.+\\)" %)
-                                  (transient-args 'magit-notes))))
+        (and-let ((str (seq-find (##string-match "^--ref=\\(.+\\)" %)
+                                 (transient-args 'magit-notes))))
           (match-str 1 str))))
 
 ;;; _
diff --git a/lisp/magit-patch.el b/lisp/magit-patch.el
index 1bdaa863993..43ca9c62a19 100644
--- a/lisp/magit-patch.el
+++ b/lisp/magit-patch.el
@@ -116,7 +116,7 @@ which creates patches for all commits that are reachable 
from
       (save-match-data
         (find-file
          (expand-file-name
-          (concat (and-let* ((v (transient-arg-value "--reroll-count=" args)))
+          (concat (and-let ((v (transient-arg-value "--reroll-count=" args)))
                     (format "v%s-" v))
                   "0000-cover-letter.patch")
           (let ((topdir (magit-toplevel)))
@@ -250,7 +250,7 @@ which creates patches for all commits that are reachable 
from
      (list (expand-file-name
             (read-file-name "Apply patch: "
                             default-directory nil nil
-                            (and-let* ((file (magit-file-at-point)))
+                            (and-let ((file (magit-file-at-point)))
                               (file-relative-name file))))
            (transient-args 'magit-patch-apply))))
   (if (not file)
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index aae3abfc257..2f0a57f9d0d 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -1026,7 +1026,7 @@ from the user."
                       magit-process-password-prompt-regexps string)))
     (process-send-string
      process
-     (concat (or (and-let* ((key (match-str 99 string)))
+     (concat (or (and-let ((key (match-str 99 string)))
                    (run-hook-with-args-until-success
                     'magit-process-find-password-functions key))
                  (let ((read-passwd-map
diff --git a/lisp/magit-pull.el b/lisp/magit-pull.el
index 12f80860166..3cd4dc5effe 100644
--- a/lisp/magit-pull.el
+++ b/lisp/magit-pull.el
@@ -134,7 +134,7 @@ the upstream."
     (magit-run-git-with-editor "pull" args remote merge)))
 
 (defun magit-pull--upstream-description ()
-  (and-let* ((branch (magit-get-current-branch)))
+  (and-let ((branch (magit-get-current-branch)))
     (or (magit-get-upstream-branch branch)
         (let ((remote (magit-get "branch" branch "remote"))
               (merge  (magit-get "branch" branch "merge"))
diff --git a/lisp/magit-push.el b/lisp/magit-push.el
index f5ff91acd88..a1691c8d1ad 100644
--- a/lisp/magit-push.el
+++ b/lisp/magit-push.el
@@ -155,7 +155,7 @@ the upstream."
     (magit-run-git-async "push" "-v" args remote (concat branch ":" merge))))
 
 (defun magit-push--upstream-description ()
-  (and-let* ((branch (magit-get-current-branch)))
+  (and-let ((branch (magit-get-current-branch)))
     (or (magit-get-upstream-branch branch)
         (let ((remote (magit-get "branch" branch "remote"))
               (merge  (magit-get "branch" branch "merge"))
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index 858f6f62485..fe690f5f2cd 100644
--- a/lisp/magit-refs.el
+++ b/lisp/magit-refs.el
@@ -363,9 +363,9 @@ Type \\[magit-reset] to reset `HEAD' to the commit at point.
      ((eq major-mode 'magit-refs-mode)
       (setq args magit-buffer-arguments))
      ((and (memq use-buffer-args '(always selected))
-           (and-let* ((buffer (magit-get-mode-buffer
-                               'magit-refs-mode nil
-                               (eq use-buffer-args 'selected))))
+           (and-let ((buffer (magit-get-mode-buffer
+                              'magit-refs-mode nil
+                              (eq use-buffer-args 'selected))))
              (progn
                (setq args (buffer-local-value 'magit-buffer-arguments buffer))
                t))))
@@ -509,8 +509,8 @@ Branch %s already exists.
   "<1>" (magit-menu-item "Visit %s"  #'magit-visit-ref))
 
 (defun magit--painted-branch-as-menu-section (section)
-  (and-let* ((_(magit-section-match 'commit))
-             (branch (magit--painted-branch-at-point)))
+  (and-let ((_(magit-section-match 'commit))
+            (branch (magit--painted-branch-at-point)))
     (let ((dummy (magit-section :type 'branch :value branch)))
       (oset dummy keymap magit-branch-section-map)
       (dolist (slot '(start content hidden parent children))
diff --git a/lisp/magit-repos.el b/lisp/magit-repos.el
index 8a21fc6e3fb..c79d6e66dc5 100644
--- a/lisp/magit-repos.el
+++ b/lisp/magit-repos.el
@@ -374,10 +374,10 @@ Usually this is just its basename."
 
 (defun magit-repolist-column-version (_)
   "Insert a description of the repository's `HEAD' revision."
-  (and-let* ((v (or (magit-git-string "describe" "--tags" "--dirty")
-                    ;; If there are no tags, use the date in MELPA format.
-                    (magit-rev-format "%cd-g%h" nil
-                                      "--date=format:%Y%m%d.%H%M"))))
+  (and-let ((v (or (magit-git-string "describe" "--tags" "--dirty")
+                   ;; If there are no tags, use the date in MELPA format.
+                   (magit-rev-format "%cd-g%h" nil
+                                     "--date=format:%Y%m%d.%H%M"))))
     (save-match-data
       (when (string-match magit-repolist-column-version-regexp v)
         (magit--put-face (match-beginning 0) (match-end 0) 'shadow v)
@@ -439,22 +439,22 @@ which only lists the first one found."
 
 (defun magit-repolist-column-unpulled-from-upstream (spec)
   "Insert number of upstream commits not in the current branch."
-  (and-let* ((br (magit-get-upstream-branch)))
+  (and-let ((br (magit-get-upstream-branch)))
     (magit-repolist-insert-count (cadr (magit-rev-diff-count "HEAD" br)) 
spec)))
 
 (defun magit-repolist-column-unpulled-from-pushremote (spec)
   "Insert number of commits in the push branch but not the current branch."
-  (and-let* ((br (magit-get-push-branch nil t)))
+  (and-let ((br (magit-get-push-branch nil t)))
     (magit-repolist-insert-count (cadr (magit-rev-diff-count "HEAD" br)) 
spec)))
 
 (defun magit-repolist-column-unpushed-to-upstream (spec)
   "Insert number of commits in the current branch but not its upstream."
-  (and-let* ((br (magit-get-upstream-branch)))
+  (and-let ((br (magit-get-upstream-branch)))
     (magit-repolist-insert-count (car (magit-rev-diff-count "HEAD" br)) spec)))
 
 (defun magit-repolist-column-unpushed-to-pushremote (spec)
   "Insert number of commits in the current branch but not its push branch."
-  (and-let* ((br (magit-get-push-branch nil t)))
+  (and-let ((br (magit-get-push-branch nil t)))
     (magit-repolist-insert-count (car (magit-rev-diff-count "HEAD" br)) spec)))
 
 (defun magit-repolist-column-branches (spec)
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index df23254633c..84a8a5b7eab 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -520,7 +520,7 @@ the click occurred.  Otherwise return the section at point."
 The return value has the form ((TYPE . VALUE)...)."
   (cons (cons (oref section type)
               (magit-section-ident-value section))
-        (and-let* ((parent (oref section parent)))
+        (and-let ((parent (oref section parent)))
           (magit-section-ident parent))))
 
 (defun magit-section-equal (a b)
@@ -581,7 +581,7 @@ instead of in the one whose root `magit-root-section' is."
 If optional RAW is non-nil, return a list of section objects, beginning
 with SECTION, otherwise return a list of section types."
   (cons (if raw section (oref section type))
-        (and-let* ((parent (oref section parent)))
+        (and-let ((parent (oref section parent)))
           (magit-section-lineage parent raw))))
 
 (defvar-local magit-insert-section--current nil "For internal use only.")
@@ -660,11 +660,11 @@ See `magit-menu-format-desc'."
   (or (ignore-errors
         (save-excursion
           (goto-char (magit-menu-position))
-          (and-let* ((key (cl-find-if-not
-                           (lambda (key)
-                             (string-match-p "\\`<[0-9]+>\\'"
-                                             (key-description key)))
-                           (where-is-internal def))))
+          (and-let ((key (cl-find-if-not
+                          (lambda (key)
+                            (string-match-p "\\`<[0-9]+>\\'"
+                                            (key-description key)))
+                          (where-is-internal def))))
             (key-description key))))
       ""))
 
@@ -1013,7 +1013,7 @@ global map, this involves advising 
`tab-bar--define-keys'."
 (defun magit-section-hidden (section)
   "Return t if SECTION and/or an ancestor is hidden."
   (or (oref section hidden)
-      (and-let* ((parent (oref section parent)))
+      (and-let ((parent (oref section parent)))
         (magit-section-hidden parent))))
 
 (defun magit-section-hidden-body (section &optional pred)
@@ -1033,7 +1033,7 @@ global map, this involves advising 
`tab-bar--define-keys'."
 When the body of an ancestor of SECTION is collapsed then
 SECTION's body (and heading) obviously cannot be visible."
   (or (oref section hidden)
-      (and-let* ((parent (oref section parent)))
+      (and-let ((parent (oref section parent)))
         (magit-section-invisible-p parent))))
 
 (defun magit-section-show-level (level)
@@ -1139,13 +1139,13 @@ or when INTERACTIVE is non-nil, show the section in the 
echo area."
                      (if ident
                          (magit-section-ident section)
                        (apply #'vector (magit-section-lineage section)))
-                     (and-let* ((m (oref section start)))
+                     (and-let ((m (oref section start)))
                        (if (markerp m) (marker-position m) m))
                      (if-let ((m (oref section content)))
                          (format "[%s-]"
                                  (if (markerp m) (marker-position m) m))
                        "")
-                     (and-let* ((m (oref section end)))
+                     (and-let ((m (oref section end)))
                        (if (markerp m) (marker-position m) m)))))
     (when interactive
       (message "%s" str))
@@ -1244,7 +1244,7 @@ of course you want to be that precise."
 (defun magit-section-match-2 (condition section)
   (if (eq (car condition) '*)
       (or (magit-section-match-2 (cdr condition) section)
-          (and-let* ((parent (oref section parent)))
+          (and-let ((parent (oref section parent)))
             (magit-section-match-2 condition parent)))
     (and (let ((c (car condition)))
            (if (class-p c)
@@ -1253,7 +1253,7 @@ of course you want to be that precise."
                  (cl-typep section class)
                (eq (oref section type) c))))
          (or (not (setq condition (cdr condition)))
-             (and-let* ((parent (oref section parent)))
+             (and-let ((parent (oref section parent)))
                (magit-section-match-2 condition parent))))))
 
 (defun magit-section-value-if (condition &optional section)
@@ -1265,7 +1265,7 @@ then return nil.  If the section does not match, then 
return
 nil.
 
 See `magit-section-match' for the forms CONDITION can take."
-  (and-let* ((section (or section (magit-current-section))))
+  (and-let ((section (or section (magit-current-section))))
     (and (magit-section-match condition section)
          (oref section value))))
 
@@ -1571,7 +1571,7 @@ is explicitly expanded."
 (defun magit-section--set-section-properties (section)
   (pcase-let* (((eieio start end children keymap) section)
                (props `( magit-section ,section
-                         ,@(and-let* ((map (symbol-value keymap)))
+                         ,@(and-let ((map (symbol-value keymap)))
                              (list 'keymap map)))))
     (if children
         (save-excursion
@@ -1771,7 +1771,7 @@ evaluated its BODY.  Admittedly that's a bit of a hack."
       (and as-child
            (oref section heading-highlight-face))
       (slot-boundp section 'painted)
-      (and-let* ((children (oref section children)))
+      (and-let ((children (oref section children)))
         (magit-section-selective-highlight-p (car children) t))))
 
 ;;; Paint
@@ -1867,7 +1867,7 @@ to nil." (bound-and-true-p long-line-threshold)) 
:warning)))))
 
 (defun magit-section-goto-successor--same (section line char)
   (let ((ident (magit-section-ident section)))
-    (and-let* ((found (magit-get-section ident)))
+    (and-let ((found (magit-get-section ident)))
       (let ((start (oref found start)))
         (goto-char start)
         (unless (eq found magit-root-section)
@@ -1879,23 +1879,23 @@ to nil." (bound-and-true-p long-line-threshold)) 
:warning)))))
         t))))
 
 (defun magit-section-goto-successor--related (section)
-  (and-let* ((found (magit-section-goto-successor--related-1 section)))
+  (and-let ((found (magit-section-goto-successor--related-1 section)))
     (goto-char (if (eq (oref found type) 'button)
                    (point-min)
                  (oref found start)))))
 
 (defun magit-section-goto-successor--related-1 (section)
-  (or (and-let* ((alt (pcase (oref section type)
-                        ('staged 'unstaged)
-                        ('unstaged 'staged)
-                        ('unpushed 'unpulled)
-                        ('unpulled 'unpushed))))
+  (or (and-let ((alt (pcase (oref section type)
+                       ('staged 'unstaged)
+                       ('unstaged 'staged)
+                       ('unpushed 'unpulled)
+                       ('unpulled 'unpushed))))
         (magit-get-section `((,alt) (status))))
-      (and-let* ((next (car (magit-section-siblings section 'next))))
+      (and-let ((next (car (magit-section-siblings section 'next))))
         (magit-get-section (magit-section-ident next)))
-      (and-let* ((prev (car (magit-section-siblings section 'prev))))
+      (and-let ((prev (car (magit-section-siblings section 'prev))))
         (magit-get-section (magit-section-ident prev)))
-      (and-let* ((parent (oref section parent)))
+      (and-let ((parent (oref section parent)))
         (or (magit-get-section (magit-section-ident parent))
             (magit-section-goto-successor--related-1 parent)))))
 
@@ -2074,11 +2074,11 @@ When `magit-section-preserve-visibility' is nil, return 
nil."
             (memq section (if sselection
                               selection
                             (setq selection (magit-region-sections))))
-            (and-let* ((parent (oref section parent)))
+            (and-let ((parent (oref section parent)))
               (magit-section-selected-p parent selection)))))
 
 (defun magit-section-parent-value (section)
-  (and-let* ((parent (oref section parent)))
+  (and-let ((parent (oref section parent)))
     (oref parent value)))
 
 (defun magit-section-siblings (section &optional direction)
@@ -2416,7 +2416,7 @@ This is like moving to POS and then calling `pos-eol'."
                                   (cdr magit--imenu-group-types)
                                   section))
                           (magit-section-match magit--imenu-group-types 
section))
-                        (and-let* ((children (oref section children)))
+                        (and-let ((children (oref section children)))
                           `((,(magit--imenu-index-name section)
                              ,@(mapcar (##cons (magit--imenu-index-name %)
                                                (oref % start))
diff --git a/lisp/magit-sequence.el b/lisp/magit-sequence.el
index 26bce1b5989..123bf725a03 100644
--- a/lisp/magit-sequence.el
+++ b/lisp/magit-sequence.el
@@ -361,8 +361,8 @@ the process manually."
     (or (file-exists-p (expand-file-name "CHERRY_PICK_HEAD" dir))
         ;; And CHERRY_PICK_HEAD does not exist when a conflict happens
         ;; while picking a series of commits with --no-commit.
-        (and-let* ((line (magit-file-line
-                          (expand-file-name "sequencer/todo" dir))))
+        (and-let ((line (magit-file-line
+                         (expand-file-name "sequencer/todo" dir))))
           (string-prefix-p "pick" line)))))
 
 ;;; Revert
@@ -419,8 +419,8 @@ without prompting."
     (or (file-exists-p (expand-file-name "REVERT_HEAD" dir))
         ;; And REVERT_HEAD does not exist when a conflict happens
         ;; while reverting a series of commits with --no-commit.
-        (and-let* ((line (magit-file-line
-                          (expand-file-name "sequencer/todo" dir))))
+        (and-let ((line (magit-file-line
+                         (expand-file-name "sequencer/todo" dir))))
           (string-prefix-p "revert" line)))))
 
 ;;; Patch
@@ -622,7 +622,7 @@ the upstream."
     (magit-git-rebase upstream args)))
 
 (defun magit-rebase--upstream-description ()
-  (and-let* ((branch (magit-get-current-branch)))
+  (and-let ((branch (magit-get-current-branch)))
     (or (magit-get-upstream-branch branch)
         (let ((remote (magit-get "branch" branch "remote"))
               (merge  (magit-get "branch" branch "merge"))
@@ -764,8 +764,8 @@ argument, prompt for the first commit to potentially squash 
into."
   (interactive (list current-prefix-arg
                      (magit-rebase-arguments)))
   (magit-rebase-interactive-1
-      (and-let* ((_(not select))
-                 (upstream (magit-get-upstream-branch)))
+      (and-let ((_(not select))
+                (upstream (magit-get-upstream-branch)))
         (magit-git-string "merge-base" upstream "HEAD"))
       (nconc (list "--autosquash" "--keep-empty") args)
     "Type %p on a commit to squash into it and then rebase as necessary,"
@@ -1031,8 +1031,8 @@ status buffer (i.e., the reverse of how they will be 
applied)."
     (magit-sequence-insert-sequence
      (magit-file-line (expand-file-name "rebase-merge/stopped-sha" dir))
      onto
-     (and-let* ((lines (magit-file-lines
-                        (expand-file-name "rebase-merge/done" dir))))
+     (and-let ((lines (magit-file-lines
+                       (expand-file-name "rebase-merge/done" dir))))
        (cadr (split-string (car (last lines))))))))
 
 (defun magit-rebase-insert-apply-sequence (onto)
diff --git a/lisp/magit-status.el b/lisp/magit-status.el
index 2442ee73f2e..57774446ca4 100644
--- a/lisp/magit-status.el
+++ b/lisp/magit-status.el
@@ -454,7 +454,7 @@ Type \\[magit-commit] to create a commit.
          (`(,largs ,lfiles) (magit-log--get-value  'magit-status-mode 
'status)))
       (magit-setup-buffer #'magit-status-mode nil
         :initial-section #'magit-status-goto-initial-section
-        :select-section (and-let* ((args (magit-status--get-file-position)))
+        :select-section (and-let ((args (magit-status--get-file-position)))
                           (lambda () (apply #'magit-status--goto-file-position 
args)))
         (magit-buffer-diff-args  dargs)
         (magit-buffer-diff-files dfiles)
diff --git a/lisp/magit-transient.el b/lisp/magit-transient.el
index d0f8490b182..8d5ecd60cbf 100644
--- a/lisp/magit-transient.el
+++ b/lisp/magit-transient.el
@@ -190,7 +190,7 @@
          (default  (if (functionp defaultp) (funcall defaultp obj) defaultp))
          (fallback (oref obj fallback))
          (fallback (and fallback
-                        (and-let* ((val (magit-get fallback)))
+                        (and-let ((val (magit-get fallback)))
                           (concat fallback ":" val)))))
     (if (not globalp)
         (setq value (magit-git-string "config" "--local"  variable))
diff --git a/lisp/magit-wip.el b/lisp/magit-wip.el
index 22211c9e6fc..8cccc512048 100644
--- a/lisp/magit-wip.el
+++ b/lisp/magit-wip.el
@@ -121,7 +121,7 @@ variant `magit-wip-after-save-mode'."
              (if magit--wip-activation-cache
                  (if-let ((elt (assoc default-directory
                                       magit--wip-activation-cache)))
-                     (and-let* ((top (cadr elt)))
+                     (and-let ((top (cadr elt)))
                        (member (file-relative-name buffer-file-name top)
                                (cddr elt)))
                    (if-let ((top (magit-toplevel)))
@@ -352,8 +352,8 @@ commit message."
 (defun magit--wip-ref (namespace &optional ref)
   (concat magit-wip-namespace namespace
           (or (and ref (string-prefix-p "refs/" ref) ref)
-              (and-let* ((branch (and (not (equal ref "HEAD"))
-                                      (or ref (magit-get-current-branch)))))
+              (and-let ((_(not (equal ref "HEAD")))
+                        (branch (or ref (magit-get-current-branch))))
                 (concat "refs/heads/" branch))
               "HEAD")))
 
@@ -420,7 +420,7 @@ many \"branches\" of each wip ref are shown."
                           args files))
 
 (defun magit-wip-log-get-tips (wipref count)
-  (and-let* ((reflog (magit-git-lines "reflog" wipref)))
+  (and-let ((reflog (magit-git-lines "reflog" wipref)))
     (let (tips)
       (while (and reflog (> count 1))
         ;; "start autosaving ..." is the current message, but it used
diff --git a/lisp/magit.el b/lisp/magit.el
index 5492be94dbb..8bbd809e9c2 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -532,8 +532,8 @@ is run in the top-level directory of the current working 
tree."
                               (fpr (epg-sub-key-fingerprint key))
                               (id  (epg-sub-key-id key))
                               (author
-                               (and-let* ((id-obj
-                                           (car (epg-key-user-id-list cert))))
+                               (and-let ((id-obj
+                                          (car (epg-key-user-id-list cert))))
                                  (let ((id-str (epg-user-id-string id-obj)))
                                    (if (stringp id-str)
                                        id-str

Reply via email to