aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-09-09 10:25:17 +1000
committerYuchen Pei <hi@ypei.me>2022-09-09 10:25:17 +1000
commit95f428ce031085a3dc3f2bc983b33bef125498af (patch)
treea6420df5b163bf0abd83ab08f19ff8d5d77291f4
parentad908b0728d8663667dc877ba91b8a7d7008be7d (diff)
removed an unused function and fix namespace for a fun
-rw-r--r--lisp/hcel-client.el10
1 files changed, 2 insertions, 8 deletions
diff --git a/lisp/hcel-client.el b/lisp/hcel-client.el
index 68f9507..3a484f6 100644
--- a/lisp/hcel-client.el
+++ b/lisp/hcel-client.el
@@ -104,13 +104,7 @@
(defun hcel-api-global-references (name)
(hcel-url-fetch-json (concat hcel-endpoint "/api/globalReferences/" name)))
-(defun http-status (header)
- (save-excursion
- (goto-char (point-min))
- (string-match "^HTTP.*\\([0-9]\\{3\\}\\).*$" header)
- (match-string 1 header)))
-
-(defun parse-http-header (text)
+(defun hcel-parse-http-header (text)
(let ((status) (fields))
(with-temp-buffer
(insert text)
@@ -128,7 +122,7 @@
(with-current-buffer (url-retrieve-synchronously url t)
(let ((header) (status) (fields) (json))
(delete-http-header)
- (setq header (parse-http-header (car kill-ring))
+ (setq header (hcel-parse-http-header (car kill-ring))
status (alist-get 'status header)
fields (alist-get 'fields header))
(with-current-buffer hcel-client-buffer-name