summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLudovic Court`es2007-08-30 16:20:32 +0000
committerLudovic Court`es2007-08-30 16:20:32 +0000
commit0b43fcc72a3d8cd8de9fe72c99440b095946593d (patch)
tree6edbb95c8aaf7f29939f4c01744d16cbc8e5a3e7 /src
parent57fa8c46016cf60acf6f7893a23829d85191ac19 (diff)
downloadskribilo-0b43fcc72a3d8cd8de9fe72c99440b095946593d.tar.gz
skribilo-0b43fcc72a3d8cd8de9fe72c99440b095946593d.tar.lz
skribilo-0b43fcc72a3d8cd8de9fe72c99440b095946593d.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/guile/skribilo/ast.scm11
-rw-r--r--src/guile/skribilo/engine/lout.scm9
2 files changed, 11 insertions, 9 deletions
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.