emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit 7f842737ef 1/4: Remove all but one reminder abo


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 7f842737ef 1/4: Remove all but one reminder about the and-let* bug
Date: Wed, 1 May 2024 21:59:55 -0400 (EDT)

branch: elpa/git-commit
commit 7f842737ef165acbfb3e4c3e0b21b6de69c9e307
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Remove all but one reminder about the and-let* bug
    
    I've seen this so often now, I wouldn't be able to forget again, even if
    I wanted to.  Extend the remaining comment to make sure we'll remove the
    workarounds, as soon we can, when we start requiring Emacs 27 or greater.
---
 lisp/magit-diff.el | 6 +++---
 lisp/magit-git.el  | 8 +++++---
 lisp/magit-refs.el | 2 +-
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index ccc66aea89..57db0c1219 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -1118,7 +1118,7 @@ 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 ; work around debbugs#31840
+      (progn
         (deactivate-mark)
         (concat (car (last commits)) ".." (car commits)))))
    (magit-buffer-refname
@@ -1172,7 +1172,7 @@ If no DWIM context is found, nil is returned."
   (and-let* ((commits (magit-region-values '(commit branch) t))
              (revA (car (last commits)))
              (revB (car commits)))
-    (progn ; work around debbugs#31840
+    (progn
       (when interactive
         (deactivate-mark))
       (if mbase
@@ -1715,7 +1715,7 @@ the Magit-Status buffer for DIRECTORY."
 (defun magit-diff-visit--hunk ()
   (and-let* ((scope (magit-diff-scope))
              (section (magit-current-section)))
-    (progn ; work around debbugs#31840
+    (progn
       (cl-case scope
         ((file files)
          (setq section (car (oref section children))))
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 7c86110238..ae7824e7d4 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -1476,7 +1476,9 @@ Git."
 
 (defun magit-name-tag (rev &optional lax)
   (and-let* ((name (magit-rev-name rev "refs/tags/*")))
-    (progn ; work around debbugs#31840
+    ;; The progn is necessary to work around debbugs#31840.  This, and all
+    ;; the other instances, can be removed once we require at least Emacs 27.
+    (progn
       (when (string-suffix-p "^0" name)
         (setq name (substring name 0 -2)))
       (and (or lax (not (string-match-p "[~^]" name)))
@@ -2309,7 +2311,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)))
-    (progn ; work around debbugs#31840
+    (progn
       (magit--put-face 0 (string-match " " str) 'magit-hash str)
       str)))
 
@@ -2658,7 +2660,7 @@ and this option only controls what face is used.")
   (magit-read-range
    prompt
    (or (and-let* ((revs (magit-region-values '(commit branch) t)))
-         (progn ; work around debbugs#31840
+         (progn
            (deactivate-mark)
            (concat (car (last revs)) ".." (car revs))))
        (magit-branch-or-commit-at-point)
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index eb4d9b9bdf..ee6b1e9a85 100644
--- a/lisp/magit-refs.el
+++ b/lisp/magit-refs.el
@@ -357,7 +357,7 @@ Type \\[magit-reset] to reset `HEAD' to the commit at point.
            (and-let* ((buffer (magit-get-mode-buffer
                                'magit-refs-mode nil
                                (eq use-buffer-args 'selected))))
-             (progn ; work around debbugs#31840
+             (progn
                (setq args (buffer-local-value 'magit-buffer-arguments buffer))
                t))))
      (t



reply via email to

[Prev in Thread] Current Thread [Next in Thread]