From 0b43fcc72a3d8cd8de9fe72c99440b095946593d Mon Sep 17 00:00:00 2001
From: Ludovic Court`es
Date: Thu, 30 Aug 2007 16:20:32 +0000
Subject: Moved `first-paragraph?' to `ast'.

* src/guile/skribilo/ast.scm (first-paragraph?): New.

* src/guile/skribilo/engine/lout.scm (first-paragraph?): Removed.

git-archimport-id: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-103
---
 src/guile/skribilo/ast.scm         | 11 +++++++++++
 src/guile/skribilo/engine/lout.scm |  9 ---------
 2 files changed, 11 insertions(+), 9 deletions(-)

(limited to 'src')

diff --git a/src/guile/skribilo/ast.scm b/src/guile/skribilo/ast.scm
index 746cbbf..21df4f3 100644
--- a/src/guile/skribilo/ast.scm
+++ b/src/guile/skribilo/ast.scm
@@ -65,6 +65,7 @@
            container-search-down search-down find-down find1-down
            find-up find1-up
            ast-document ast-chapter ast-section
+           first-paragraph?
 
            ;; numbering
            markup-number-string
@@ -619,6 +620,16 @@
 (define (ast-section m)
   (find1-up (lambda (n) (is-markup? n 'section)) m))
 
+(define (first-paragraph? n)
+  ;; Return true if N is the first paragraph in this container.
+  (and (is-markup? n 'paragraph)
+       (let* ((parent   (ast-parent n))
+              (siblings (markup-body parent)))
+         (and (pair? siblings)
+              (eq? n (find (lambda (n)
+                             (is-markup? n 'paragraph))
+                           siblings))))))
+
 
 ;;;
 ;;; Section numbering.
diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm
index 70d8f97..1aefe5c 100644
--- a/src/guile/skribilo/engine/lout.scm
+++ b/src/guile/skribilo/engine/lout.scm
@@ -1534,15 +1534,6 @@
 ;*    support for paragraphs ...                                       */
 ;*---------------------------------------------------------------------*/
 
-(define (first-paragraph? n)
-  ;; Return true if N is the first paragraph in this container.
-  (let* ((parent   (ast-parent n))
-         (siblings (markup-body parent)))
-    (and (pair? siblings)
-         (eq? n (find (lambda (n)
-                        (is-markup? n 'paragraph))
-                      siblings)))))
-
 (define (make-drop-capital? n e)
   ;; Return true if the first letter of N's body should be output as a drop
   ;; capital.
-- 
cgit v1.2.3