view src/testdir/test33.ok @ 7239:89c6f7c6704a v7.4.928

commit https://github.com/vim/vim/commit/5d8afebb5bf7fb1e8ce06062451dc6a1f9a53ac0 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 19 19:55:16 2015 +0100 patch 7.4.928 Problem: A clientserver message interrupts handling keys of a mapping. Solution: Have mch_inchar() send control back to WaitForChar when it is interrupted by server message. (James Kolb)
author Christian Brabandt <cb@256bit.org>
date Thu, 19 Nov 2015 20:00:05 +0100
parents 3fc0f57ecb91
children
line wrap: on
line source

(defun html-file (base)
  (format nil "~(~A~).html" base))

(defmacro page (name title &rest body)
  (let ((ti (gensym)))
       `(with-open-file (*standard-output*
			 (html-file ,name)
			 :direction :output
			 :if-exists :supersede)
			(let ((,ti ,title))
			     (as title ,ti)
			     (with center 
				   (as h2 (string-upcase ,ti)))
			     (brs 3)
			     ,@body))))

;;; Utilities for generating links

(defmacro with-link (dest &rest body)
  `(progn
    (format t "<a href=\"~A\">" (html-file ,dest))
    ,@body
    (princ "</a>")))