From 7f510579264d6e28ca3e429e4ec26ad2ec39f9e1 Mon Sep 17 00:00:00 2001 From: Nic Ferier Date: Sun, 22 Jul 2012 22:12:01 +0100 Subject: [PATCH] make into a package --- terrible-template.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/terrible-template.el b/terrible-template.el index 99945a7..bb52412 100644 --- a/terrible-template.el +++ b/terrible-template.el @@ -5,6 +5,7 @@ ;; Author: Jonathan E. Magen ;; Maintainer: Jonathan E. Magen ;; Created: 2012-07-22 +;; Version: 20120722001 ;; Keywords: lisp, template ;; This file is NOT part of GNU Emacs. @@ -86,6 +87,7 @@ (cadr key-value-pair) template-string)) +;;;###autoload (defun terrible-template-apply-template (template-string &rest key-value-pairs) "Apply a terrible template by interpolating all variables according to provided values" (terrible-template-log (concat "Key value pairs: " (prin1-to-string key-value-pairs t))) @@ -102,6 +104,7 @@ (terrible-template-error "Wrong number of key-value pairs provided for template") (terrible-template-apply-template template-string key-value-pairs)))) +;;;###autoload (defun terrible-template-insert (template-name) (interactive (list (completing-read "Template name: " (terrible-template-get-template-names)))) @@ -127,6 +130,7 @@ *terrible-template-global-template-list*) names)) +;;;###autoload (defmacro defterrible (template-name &rest template-body) (let ((contents nil) (tags nil))