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

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

[elpa] externals/xeft 361ee04913 54/55: * xeft.el (xeft--download-module


From: ELPA Syncer
Subject: [elpa] externals/xeft 361ee04913 54/55: * xeft.el (xeft--download-module): Fix.
Date: Fri, 13 Jan 2023 23:58:40 -0500 (EST)

branch: externals/xeft
commit 361ee049138bd5359d1cb2ee531e861a68ef0b1e
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    * xeft.el (xeft--download-module): Fix.
---
 xeft.el | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/xeft.el b/xeft.el
index 77d1a7defa..aa420bfc66 100644
--- a/xeft.el
+++ b/xeft.el
@@ -201,24 +201,24 @@ If success return non-nil, otherwise return nil."
 (defun xeft--download-module ()
   "Download pre-built module from GitHub. Return non-nil if success."
   (when (y-or-n-p "You are about to download binary from Internet without 
checking checksum, do you want to continue?")
-    (let ((system (car (read-multiple-choice
-                        "Which prebuilt binary do you want to download? "
-                        '((?1 "amd64-GNU/Linux"
-                              "GNU/Linux on Intel/AMD x86_64 CPU")
-                          (?2 "amd64-macOS"
-                              "macOS on Intel/AMD x86_64 CPU")
-                          (?q "quit")))))
-          (module-path (expand-file-name
-                        "xapian-lite.so"
-                        (file-name-directory
-                         (locate-library "xeft.el" t)))))
-      (if (eq system ?q)
-          nil
-        (url-copy-file
-         (pcase system
-           (1 xeft--linux-module-url)
-           (2 xeft--mac-module-url))
-         module-path)))))
+    (let* ((system (car (read-multiple-choice
+                         "Which prebuilt binary do you want to download? "
+                         '((?1 "amd64-GNU/Linux"
+                               "GNU/Linux on Intel/AMD x86_64 CPU")
+                           (?2 "amd64-macOS"
+                               "macOS on Intel/AMD x86_64 CPU")
+                           (?q "quit")))))
+           (module-path (expand-file-name
+                         "xapian-lite.so"
+                         (file-name-directory
+                          (locate-library "xeft.el" t))))
+           (url (pcase system
+                  (?1 xeft--linux-module-url)
+                  (?2 xeft--mac-module-url))))
+      (when (and url
+                 (y-or-n-p (format "Downloading from %s, is that ok?"
+                                   url)))
+        (url-copy-file url module-path)))))
 
 ;;; Helpers
 



reply via email to

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