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

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

[elpa] externals/embark 09a7d69b01: eww-download-callback takes 2 args o


From: ELPA Syncer
Subject: [elpa] externals/embark 09a7d69b01: eww-download-callback takes 2 args on 27.1 (fix #557)
Date: Tue, 8 Nov 2022 14:57:39 -0500 (EST)

branch: externals/embark
commit 09a7d69b01816f5b3a190d50d6091425863ab167
Author: Omar Antolín Camarena <omar.antolin@gmail.com>
Commit: Omar Antolín Camarena <omar.antolin@gmail.com>

    eww-download-callback takes 2 args on 27.1 (fix #557)
    
    In Emacs 27.1 and older eww-download-callback always uses
    eww-download-directory, but in Emacs 28 it takes a second argument
    that specifies the directory. This change uses func-arity to decide
    between the calling conventions. (Luckily func-arity was added in
    Emacs 26.1, which is what Embark depends on.)
---
 embark.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/embark.el b/embark.el
index 89e90ff706..e29e83d9f7 100644
--- a/embark.el
+++ b/embark.el
@@ -3745,7 +3745,10 @@ ALGORITHM is the hash algorithm symbol understood by 
`secure-hash'."
   (let ((dir eww-download-directory))
     (when (functionp dir) (setq dir (funcall dir)))
     (access-file dir "Download failed")
-    (url-retrieve url #'eww-download-callback (list url dir))))
+    (url-retrieve url #'eww-download-callback
+                  (if (= (car (func-arity #'eww-download-callback)) 3)
+                      (list url dir)
+                    (list url)))))
 
 ;;; Setup and pre-action hooks
 



reply via email to

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