From 1c445dd093cb6a02289f25324039ce1cba358145 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 17 May 2012 23:37:43 +0200 Subject: Change `define-markup' to generate a macro, to capture location syntactically. * src/guile/skribilo/lib.scm (dsssl->guile-formals): New procedure, formerly `fix-rest-arg' procedure in `define-markup'. (define-markup)[guile-2]: Turn into a macro-generating macro, such that markups capture their invocation location syntactically. * src/guile/skribilo/location.scm (source-properties->location): New procedure. (invocation-location): Use it. * src/guile/skribilo/package/base.scm (handle): Move above first use, since it's now a macro on Guile 2.0. * src/guile/skribilo/package/slide.scm (slide-vspace): Likewise. * src/guile/skribilo/package/eq.scm: Use (skribilo package base) instead of autoloading it. * tests/Makefile.am (TESTS): Add `location.test'. * tests/location.test: New file. --- src/guile/skribilo/package/slide.scm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/guile/skribilo/package/slide.scm') diff --git a/src/guile/skribilo/package/slide.scm b/src/guile/skribilo/package/slide.scm index 60e11b0..9ba0692 100644 --- a/src/guile/skribilo/package/slide.scm +++ b/src/guile/skribilo/package/slide.scm @@ -1,7 +1,7 @@ ;;; slide.scm -- Overhead transparencies. ;;; -*- coding: iso-8859-1 -*- ;;; -;;; Copyright 2006, 2007, 2008, 2009 Ludovic Courtès +;;; Copyright 2006, 2007, 2008, 2009, 2012 Ludovic Courtès ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; @@ -51,6 +51,16 @@ (define %slide-the-slides '()) (define %slide-the-counter 0) +;*---------------------------------------------------------------------*/ +;* slide-vspace ... */ +;*---------------------------------------------------------------------*/ +(define-markup (slide-vspace :rest opt :key (unit 'cm)) + (new markup + (markup 'slide-vspace) + (loc &invocation-location) + (options `((:unit ,unit) ,@(the-options opt :unit))) + (body (the-body opt)))) + ;*---------------------------------------------------------------------*/ ;* slide ... */ ;*---------------------------------------------------------------------*/ @@ -151,16 +161,6 @@ (loc &invocation-location) (markup 'slide-pause))) -;*---------------------------------------------------------------------*/ -;* slide-vspace ... */ -;*---------------------------------------------------------------------*/ -(define-markup (slide-vspace :rest opt :key (unit 'cm)) - (new markup - (markup 'slide-vspace) - (loc &invocation-location) - (options `((:unit ,unit) ,@(the-options opt :unit))) - (body (the-body opt)))) - ;*---------------------------------------------------------------------*/ ;* slide-embed ... */ ;*---------------------------------------------------------------------*/ -- cgit v1.2.3