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

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

[elpa] externals/hcel cc43ecd801 04/13: minor fix var name


From: ELPA Syncer
Subject: [elpa] externals/hcel cc43ecd801 04/13: minor fix var name
Date: Wed, 21 Sep 2022 08:57:48 -0400 (EDT)

branch: externals/hcel
commit cc43ecd801fd6759d574d2f8ea846265565b507a
Author: Yuchen Pei <hi@ypei.me>
Commit: Yuchen Pei <hi@ypei.me>

    minor fix var name
---
 README.org     |  2 +-
 hcel-client.el | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/README.org b/README.org
index 3eaab61427..8c7cbe8b39 100644
--- a/README.org
+++ b/README.org
@@ -33,7 +33,7 @@ indexed packages, do the following and you are all set.
 
 #+begin_src elisp
 (require 'hc)
-(setq hcel-endpoint "localhost:8080")
+(setq hcel-host "localhost:8080")
 #+end_src
 
 * Use
diff --git a/hcel-client.el b/hcel-client.el
index 1aa0d0f6ef..2061be96de 100644
--- a/hcel-client.el
+++ b/hcel-client.el
@@ -17,7 +17,7 @@
 ;; You should have received a copy of the GNU Affero General Public
 ;; License along with hcel.  If not, see <https://www.gnu.org/licenses/>.
 
-(defcustom hcel-endpoint "localhost:8080"
+(defcustom hcel-host "localhost:8080"
   "hcel endpoint"
   :group 'hcel)
 (defcustom hcel-indexed-dir "/.haskell-code-explorer"
@@ -28,7 +28,7 @@
 
 (defun hcel-api-packages ()
   (let ((packages
-         (hcel-url-fetch-json (concat hcel-endpoint "/api/packages"))))
+         (hcel-url-fetch-json (concat hcel-host "/api/packages"))))
     (mapcan
      (lambda (package)
        (mapcar
@@ -44,13 +44,13 @@
    (alist-get
     'modules
     (hcel-url-fetch-json (concat
-                     hcel-endpoint "/files/" (hcel-format-package-id 
package-id "-")
+                     hcel-host "/files/" (hcel-format-package-id package-id 
"-")
                      hcel-indexed-dir "/packageInfo.json")))))
 
 (defun hcel-api-definition-site
     (package-id component-id module-name entity name)
   (hcel-url-fetch-json
-   (concat hcel-endpoint "/api/definitionSite/"
+   (concat hcel-host "/api/definitionSite/"
            (hcel-format-package-id package-id "-")
            "/" component-id "/" module-name "/" entity "/" name)))
 
@@ -68,7 +68,7 @@
 (defun hcel-api-module-info (package-id module-path)
   (hcel-url-fetch-json
    (concat
-    hcel-endpoint "/files/" (hcel-format-package-id package-id "-")
+    hcel-host "/files/" (hcel-format-package-id package-id "-")
     hcel-indexed-dir
     "/" (replace-regexp-in-string "/" "%252F" module-path) ".json.gz")
    t))
@@ -77,7 +77,7 @@
     (package-id module-path line-beg col-beg line-end col-end)
   (hcel-url-fetch-json
    (concat
-    hcel-endpoint "/api/expressions/" (hcel-format-package-id package-id "-")
+    hcel-host "/api/expressions/" (hcel-format-package-id package-id "-")
     "/" (replace-regexp-in-string "/" "%2F" module-path)
     "/" (number-to-string (1+ line-beg))
     "/" (number-to-string (1+ col-beg))
@@ -86,7 +86,7 @@
 
 (defun hcel-api-hoogle-docs (package-id module-name entity name)
   (hcel-url-fetch-json
-   (concat hcel-endpoint "/api/hoogleDocs/"
+   (concat hcel-host "/api/hoogleDocs/"
            (hcel-format-package-id package-id "-") "/"
            module-name "/" entity "/" name)))
 
@@ -101,7 +101,7 @@
 
 (defun hcel-api-references (package-id name &optional page per-page)
   (hcel-url-fetch-json
-   (concat hcel-endpoint "/api/references/"
+   (concat hcel-host "/api/references/"
            (hcel-format-package-id package-id "-") "/"
            name
            (hcel-format-pagination-query page per-page))))
@@ -109,7 +109,7 @@
 (defun hcel-api-identifiers (scope query package-id &optional page per-page
                                    with-header)
   (hcel-url-fetch-json
-   (concat hcel-endpoint
+   (concat hcel-host
            (if (eq scope 'global)
                "/api/globalIdentifiers/"
              (concat "/api/identifiers/"
@@ -120,7 +120,7 @@
    nil with-header))
 
 (defun hcel-api-global-references (name)
-  (hcel-url-fetch-json (concat hcel-endpoint "/api/globalReferences/" name)))
+  (hcel-url-fetch-json (concat hcel-host "/api/globalReferences/" name)))
 
 (defun hcel-parse-http-header (text)
   (let ((status) (fields))



reply via email to

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