Fix warning about unused lexical variable
This commit is contained in:
parent
96e42a27f3
commit
45610d7000
1 changed files with 9 additions and 1 deletions
10
hypo.el
10
hypo.el
|
@ -37,6 +37,14 @@
|
||||||
(end (1- (search-forward "\n"))))
|
(end (1- (search-forward "\n"))))
|
||||||
(copy-region-as-kill start end)))
|
(copy-region-as-kill start end)))
|
||||||
|
|
||||||
|
(defun hypo--collect-and-kill (status)
|
||||||
|
"Collect the returned url and kill the current buffer.
|
||||||
|
|
||||||
|
STATUS is ignored."
|
||||||
|
(ignore status)
|
||||||
|
(hypo--collect-url)
|
||||||
|
(kill-buffer))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun hypo-region (start end filename)
|
(defun hypo-region (start end filename)
|
||||||
"Send the region START up to END to hypo as FILENAME."
|
"Send the region START up to END to hypo as FILENAME."
|
||||||
|
@ -50,7 +58,7 @@
|
||||||
(let ((url-request-data (buffer-substring-no-properties start end))
|
(let ((url-request-data (buffer-substring-no-properties start end))
|
||||||
(url-request-method "PUT"))
|
(url-request-method "PUT"))
|
||||||
(url-retrieve (concat "https://ryuslash.org/hypo/" filename)
|
(url-retrieve (concat "https://ryuslash.org/hypo/" filename)
|
||||||
(lambda (status) (hypo--collect-url) (kill-buffer)))))
|
#'hypo--collect-and-kill)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun hypo-buffer (buffer filename)
|
(defun hypo-buffer (buffer filename)
|
||||||
|
|
Loading…
Reference in a new issue