aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-08-13 01:35:48 +0200
committerGravatar Tom Willemse2013-08-13 01:35:48 +0200
commit45610d700091a4d77987369ce2bb9063e36afeca (patch)
tree26b649e2d927fa5efd5ba4926aee07b14da7ef28
parent96e42a27f3c333d6743fc8fbc68395797870a9c3 (diff)
downloadhypo-emacs-45610d700091a4d77987369ce2bb9063e36afeca.tar.gz
hypo-emacs-45610d700091a4d77987369ce2bb9063e36afeca.zip
Fix warning about unused lexical variable
-rw-r--r--hypo.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/hypo.el b/hypo.el
index 29589af..da7c773 100644
--- a/hypo.el
+++ b/hypo.el
@@ -37,6 +37,14 @@
(end (1- (search-forward "\n"))))
(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
(defun hypo-region (start end 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))
(url-request-method "PUT"))
(url-retrieve (concat "https://ryuslash.org/hypo/" filename)
- (lambda (status) (hypo--collect-url) (kill-buffer)))))
+ #'hypo--collect-and-kill)))
;;;###autoload
(defun hypo-buffer (buffer filename)