- ;;; hatena-let.el ---
- ;; Copyright (C) 2010 Kentaro Kuribayashi
- ;; Author: email@example.com <firstname.lastname@example.org>
- ;; This program is free software; you can redistribute it and/or modify
- ;; it under the terms of the GNU General Public License as published by
- ;; the Free Software Foundation, either version 3 of the License, or
- ;; (at your option) any later version.
- ;; This program is distributed in the hope that it will be useful,
- ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
- ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ;; GNU General Public License for more details.
- ;; You should have received a copy of the GNU General Public License
- ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
- ;;; Commentary:
- ;; hatena-let.el requires deferred.el
- ;; (https://github.com/kiwanami/emacs-deferred)
- ;; in your .emacs:
- ;; (require 'hatena-let)
- ;; (setq hatena-let/apikey " ... ")
- ;;; Code:
- (require 'deferred))
- (defvar hatena-let/apikey "" "Your API key for Hatena::Let")
- (defun hatena-let/save-code ()
- (if (or (not hatena-let/apikey) (string= hatena-let/apikey ""))
- (error "API key is required")
- `(("api_key" . ,hatena-let/apikey) ("source" . ,(buffer-string)))))))
- (provide 'hatena-let)
- ;;; hatena-let.el ends here
a guest Feb 28th, 2012 12 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data