Merge pull request #2 from syohex/cl-lib

Use cl-lib macros instead of cl.el
master
Elis Axelsson 10 years ago committed by GitHub
commit d7700eb861
  1. 27
      webpaste.el

@ -7,7 +7,7 @@
;; Package-Version: 0.0.1 ;; Package-Version: 0.0.1
;; Version: 0.0.1 ;; Version: 0.0.1
;; Keywords: convenience, comm, paste ;; Keywords: convenience, comm, paste
;; Package-Requires: ((emacs "24.1") (request "0.2.0")) ;; Package-Requires: ((emacs "24.1") (request "0.2.0") (cl-lib "0.5"))
;;; Commentary: ;;; Commentary:
@ -35,6 +35,7 @@
;;; Code: ;;; Code:
(require 'request) (require 'request)
(require 'cl-lib)
(defgroup webpaste nil (defgroup webpaste nil
@ -73,13 +74,13 @@ each run.")
:type "POST" :type "POST"
:data post-data :data post-data
:parser 'buffer-string :parser 'buffer-string
:success (function* (lambda (&key data &allow-other-keys) :success (cl-function (lambda (&key data &allow-other-keys)
(when data (when data
(webpaste-return-url data)))) (webpaste-return-url data))))
:error :error
(function* (lambda (&key error-thrown &allow-other-keys&rest _) (cl-function (lambda (&key error-thrown &allow-other-keys)
(message "Got error: %S" error-thrown) (message "Got error: %S" error-thrown)
(webpaste-paste-text text))))) (webpaste-paste-text text)))))
nil)) nil))
("dpaste.com" . ("dpaste.com" .
(lambda (text) (lambda (text)
@ -100,13 +101,13 @@ each run.")
:data post-data :data post-data
:parser 'buffer-string :parser 'buffer-string
:success :success
(function* (lambda (&key response &allow-other-keys) (cl-function (lambda (&key response &allow-other-keys)
(webpaste-return-url (webpaste-return-url
(request-response-header response "Location")))) (request-response-header response "Location"))))
:error :error
(function* (lambda (&key error-thrown &allow-other-keys&rest _) (cl-function (lambda (&key error-thrown &allow-other-keys)
(message "Got error: %S" error-thrown) (message "Got error: %S" error-thrown)
(webpaste-paste-text text))))) (webpaste-paste-text text)))))
nil))) nil)))
"Define all webpaste.el providers. "Define all webpaste.el providers.
Consists of provider name and lambda function to do the actuall call to the Consists of provider name and lambda function to do the actuall call to the

Loading…
Cancel
Save