From af90d77fc2100e42462e07486ccfa4885c0568f6 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 20 Jul 2015 01:11:05 -0700 Subject: [PATCH] wrap.words: rename wrap.words:word to wrapping-word. this ``wrapping-word`` is loaded by default and now this trivial vocabulary won't cause a naming conflict with the builtin ``word`` and one of the most used symbols and concepts in the entire language. --- basis/ui/gadgets/paragraphs/paragraphs.factor | 2 +- basis/wrap/words/words-tests.factor | 76 +++++++++---------- basis/wrap/words/words.factor | 4 +- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/basis/ui/gadgets/paragraphs/paragraphs.factor b/basis/ui/gadgets/paragraphs/paragraphs.factor index 119a50f83c..0657b5b49c 100644 --- a/basis/ui/gadgets/paragraphs/paragraphs.factor +++ b/basis/ui/gadgets/paragraphs/paragraphs.factor @@ -28,7 +28,7 @@ TUPLE: paragraph < aligned-gadget margin wrapped ; word ( gadget -- word ) - [ ] [ pref-dim first ] [ word-break? ] tri ; + [ ] [ pref-dim first ] [ word-break? ] tri ; : line-width ( words -- n ) [ break?>> ] trim-tail-slice [ width>> ] map-sum ; diff --git a/basis/wrap/words/words-tests.factor b/basis/wrap/words/words-tests.factor index 2d9b11b90a..0d3116678e 100644 --- a/basis/wrap/words/words-tests.factor +++ b/basis/wrap/words/words-tests.factor @@ -6,75 +6,75 @@ IN: wrap.words.tests { { { - T{ word f 1 10 f } - T{ word f 2 10 f } - T{ word f 3 2 t } + T{ wrapping-word f 1 10 f } + T{ wrapping-word f 2 10 f } + T{ wrapping-word f 3 2 t } } { - T{ word f 4 10 f } - T{ word f 5 10 f } + T{ wrapping-word f 4 10 f } + T{ wrapping-word f 5 10 f } } } } [ { - T{ word f 1 10 f } - T{ word f 2 10 f } - T{ word f 3 2 t } - T{ word f 4 10 f } - T{ word f 5 10 f } + T{ wrapping-word f 1 10 f } + T{ wrapping-word f 2 10 f } + T{ wrapping-word f 3 2 t } + T{ wrapping-word f 4 10 f } + T{ wrapping-word f 5 10 f } } 35 35 wrap-words [ { } like ] map ] unit-test { { { - T{ word f 1 10 f } - T{ word f 2 10 f } - T{ word f 3 9 t } - T{ word f 3 9 t } - T{ word f 3 9 t } + T{ wrapping-word f 1 10 f } + T{ wrapping-word f 2 10 f } + T{ wrapping-word f 3 9 t } + T{ wrapping-word f 3 9 t } + T{ wrapping-word f 3 9 t } } { - T{ word f 4 10 f } - T{ word f 5 10 f } + T{ wrapping-word f 4 10 f } + T{ wrapping-word f 5 10 f } } } } [ { - T{ word f 1 10 f } - T{ word f 2 10 f } - T{ word f 3 9 t } - T{ word f 3 9 t } - T{ word f 3 9 t } - T{ word f 4 10 f } - T{ word f 5 10 f } + T{ wrapping-word f 1 10 f } + T{ wrapping-word f 2 10 f } + T{ wrapping-word f 3 9 t } + T{ wrapping-word f 3 9 t } + T{ wrapping-word f 3 9 t } + T{ wrapping-word f 4 10 f } + T{ wrapping-word f 5 10 f } } 35 35 wrap-words [ { } like ] map ] unit-test { { { - T{ word f 1 10 t } - T{ word f 1 10 f } - T{ word f 3 9 t } + T{ wrapping-word f 1 10 t } + T{ wrapping-word f 1 10 f } + T{ wrapping-word f 3 9 t } } { - T{ word f 2 10 f } - T{ word f 3 9 t } + T{ wrapping-word f 2 10 f } + T{ wrapping-word f 3 9 t } } { - T{ word f 4 10 f } - T{ word f 5 10 f } + T{ wrapping-word f 4 10 f } + T{ wrapping-word f 5 10 f } } } } [ { - T{ word f 1 10 t } - T{ word f 1 10 f } - T{ word f 3 9 t } - T{ word f 2 10 f } - T{ word f 3 9 t } - T{ word f 4 10 f } - T{ word f 5 10 f } + T{ wrapping-word f 1 10 t } + T{ wrapping-word f 1 10 f } + T{ wrapping-word f 3 9 t } + T{ wrapping-word f 2 10 f } + T{ wrapping-word f 3 9 t } + T{ wrapping-word f 4 10 f } + T{ wrapping-word f 5 10 f } } 35 35 wrap-words [ { } like ] map ] unit-test diff --git a/basis/wrap/words/words.factor b/basis/wrap/words/words.factor index 72e22f9f0e..a8d87f75d5 100644 --- a/basis/wrap/words/words.factor +++ b/basis/wrap/words/words.factor @@ -4,8 +4,8 @@ USING: accessors grouping kernel math sequences sequences.private splitting.monotonic wrap ; IN: wrap.words -TUPLE: word key width break? ; -C: word +TUPLE: wrapping-word key width break? ; +C: wrapping-word