blob: 56447604023e10d61ad27e3712b355374e3325b1 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001Test for 'lisp'
2If the lisp feature is not enabled, this will fail!
3
4STARTTEST
5:so small.vim
6:set lisp
7/^(defun
8=G:/^(defun/,$w! test.out
9:q!
10ENDTEST
11
12(defun html-file (base)
13(format nil "~(~A~).html" base))
14
15(defmacro page (name title &rest body)
16(let ((ti (gensym)))
17`(with-open-file (*standard-output*
18(html-file ,name)
19:direction :output
20:if-exists :supersede)
21(let ((,ti ,title))
22(as title ,ti)
23(with center
24(as h2 (string-upcase ,ti)))
25(brs 3)
26,@body))))
27
28;;; Utilities for generating links
29
30(defmacro with-link (dest &rest body)
31`(progn
32(format t "<a href=\"~A\">" (html-file ,dest))
33,@body
34(princ "</a>")))