From 1d230301e1f70d39b6e5d96e12934546f1b126dd Mon Sep 17 00:00:00 2001
From: Ludovic Court`es
Date: Tue, 3 Apr 2007 09:42:14 +0000
Subject: Moved legacy source location code to `compat'.

* src/guile/skribilo/lib.scm (skribe-eval-location): Removed.

* src/guile/skribilo/location.scm (location-pos): Removed.

* src/guile/skribilo/utils/compat.scm: Use `(skribilo location)'.
  (location-pos, skribe-eval-location): New.

git-archimport-id: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-40
---
 src/guile/skribilo/lib.scm          | 10 +---------
 src/guile/skribilo/location.scm     |  5 -----
 src/guile/skribilo/utils/compat.scm | 11 ++++++++++-
 3 files changed, 11 insertions(+), 15 deletions(-)

(limited to 'src')

diff --git a/src/guile/skribilo/lib.scm b/src/guile/skribilo/lib.scm
index 1bac503..5d96a10 100644
--- a/src/guile/skribilo/lib.scm
+++ b/src/guile/skribilo/lib.scm
@@ -21,7 +21,7 @@
 
 (define-module (skribilo lib)
   :use-module (skribilo utils syntax)
-  :export (skribe-eval-location skribe-ast-error skribe-error
+  :export (skribe-ast-error skribe-error
            skribe-type-error
            skribe-warning skribe-warning/ast
            skribe-message
@@ -168,14 +168,6 @@
 	(else           (with-output-to-string
 			  (lambda () (write obj))))))
 
-;;;
-;;; SKRIBE-EVAL-LOCATION ...
-;;;
-(define (skribe-eval-location)
-  (format (current-error-port)
-	  "FIXME: ...... SKRIBE-EVAL-LOCATION (should not appear)\n")
-  #f)
-
 ;;;
 ;;; SKRIBE-ERROR
 ;;;
diff --git a/src/guile/skribilo/location.scm b/src/guile/skribilo/location.scm
index 1ca278f..6c23f76 100644
--- a/src/guile/skribilo/location.scm
+++ b/src/guile/skribilo/location.scm
@@ -24,7 +24,6 @@
   :use-module ((skribilo utils syntax) :select (%skribilo-module-reader))
   :export (<location> location? ast-location
 	   location-file location-line location-column
-           location-pos
            invocation-location))
 
 ;;; Author:  Ludovic Court�s
@@ -50,10 +49,6 @@
 (define (location? obj)
   (is-a? obj <location>))
 
-(define (location-pos loc)
-  ;; Kept for compatibility with Skribe.  XXX: Move to `compat.scm'.
-  0)
-
 (define (ast-location obj)
   (let ((loc (slot-ref obj 'loc)))
     (if (location? loc)
diff --git a/src/guile/skribilo/utils/compat.scm b/src/guile/skribilo/utils/compat.scm
index 9f85658..2113e95 100644
--- a/src/guile/skribilo/utils/compat.scm
+++ b/src/guile/skribilo/utils/compat.scm
@@ -1,6 +1,6 @@
 ;;; compat.scm  --  Skribe compatibility module.
 ;;;
-;;; Copyright 2005, 2006  Ludovic Court�s  <ludovic.courtes@laas.fr>
+;;; Copyright 2005, 2006, 2007  Ludovic Court�s  <ludovic.courtes@laas.fr>
 ;;;
 ;;;
 ;;; This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,7 @@
   :use-module (skribilo utils files)
   :use-module (skribilo parameters)
   :use-module (skribilo evaluator)
+  :use-module (skribilo location)
   :use-module (srfi srfi-1)
   :autoload   (srfi srfi-13)       (string-rindex)
   :use-module (srfi srfi-34)
@@ -178,6 +179,14 @@
       (set! %skribe-reader (make-reader 'skribe)))
   (%skribe-reader port))
 
+
+;;;
+;;; Location.
+;;;
+
+(define-public (location-pos loc)  0)
+
+(define-public skribe-eval-location invocation-location)
 
 
 ;;;
-- 
cgit v1.2.3