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

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

[nongnu] elpa/git-commit 728685f7be 2/8: magit-read-range-or-commit: Cos


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 728685f7be 2/8: magit-read-range-or-commit: Cosmetics
Date: Tue, 5 Sep 2023 21:59:36 -0400 (EDT)

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

    magit-read-range-or-commit: Cosmetics
    
    Due to an Emacs bug, this is actually uglier than before, but
    it is still more important to signal that the value matters.
---
 lisp/magit-git.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 8f614da045..37dd31cbc8 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -2595,9 +2595,10 @@ and this option only controls what face is used.")
 (defun magit-read-range-or-commit (prompt &optional secondary-default)
   (magit-read-range
    prompt
-   (or (when-let ((revs (magit-region-values '(commit branch) t)))
-         (deactivate-mark)
-         (concat (car (last revs)) ".." (car revs)))
+   (or (and-let* ((revs (magit-region-values '(commit branch) t)))
+         (progn ; work around debbugs#31840
+           (deactivate-mark)
+           (concat (car (last revs)) ".." (car revs))))
        (magit-branch-or-commit-at-point)
        secondary-default
        (magit-get-current-branch))))



reply via email to

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