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

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

[nongnu] elpa/git-commit 9866049 2/2: magit-dired-am-apply-patches: Make


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 9866049 2/2: magit-dired-am-apply-patches: Make compatible with Emacs < 27
Date: Wed, 8 Sep 2021 20:57:27 -0400 (EDT)

branch: elpa/git-commit
commit 98660490c24e878dd1a3f81b6f4dfcf8a201917e
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>

    magit-dired-am-apply-patches: Make compatible with Emacs < 27
    
    dired-get-marked-files's ERROR argument isn't available until Emacs
    27.1, so handle the error case on our end.
    
    Closes #4498.
---
 lisp/magit-extras.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/magit-extras.el b/lisp/magit-extras.el
index 29dece8..d374194 100644
--- a/lisp/magit-extras.el
+++ b/lisp/magit-extras.el
@@ -204,7 +204,10 @@ for a repository."
   (interactive (list (or (magit-toplevel)
                          (magit-read-repository t))
                      current-prefix-arg))
-  (let ((files (dired-get-marked-files nil arg nil nil t)))
+  ;; Note: The ERROR argument of `dired-get-marked-files' isn't
+  ;; available until Emacs 27.
+  (let ((files (or (dired-get-marked-files nil arg)
+                   (user-error "No files specified"))))
     (magit-status-setup-buffer repo)
     (magit-am-apply-patches files)))
 



reply via email to

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