diff options
author | Ludovic Court`es | 2007-08-30 16:56:46 +0000 |
---|---|---|
committer | Ludovic Court`es | 2007-08-30 16:56:46 +0000 |
commit | d0b458a3a704bb4a5e04467a9eb0342c8a974d42 (patch) | |
tree | 356ce169e0b10f7438d1710e36ae003269470896 /src/guile | |
parent | d7b35e71841a78456c40e12dc0ef64b5f7a76980 (diff) | |
parent | 0b43fcc72a3d8cd8de9fe72c99440b095946593d (diff) | |
download | skribilo-d0b458a3a704bb4a5e04467a9eb0342c8a974d42.tar.gz skribilo-d0b458a3a704bb4a5e04467a9eb0342c8a974d42.tar.lz skribilo-d0b458a3a704bb4a5e04467a9eb0342c8a974d42.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: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-161
Diffstat (limited to 'src/guile')
-rw-r--r-- | src/guile/skribilo/ast.scm | 11 | ||||
-rw-r--r-- | src/guile/skribilo/engine/lout.scm | 9 |
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. |