]> gitweb.factorcode.org Git - factor.git/commitdiff
format-using: use the prettyprint configuration for indent and width-limit
authorAlexander Ilin <alex.ilin@protonmail.com>
Sun, 13 Aug 2023 13:29:00 +0000 (15:29 +0200)
committerAlexander Ilin <alex.ilin@protonmail.com>
Sun, 13 Aug 2023 23:32:13 +0000 (01:32 +0200)
extra/format-using/format-using.factor

index 8bbdec87e59f3add0abd05343cbc7f94567a076f..d88dc47b4aa1a216b16b4cad38de233aee472c80 100644 (file)
@@ -1,12 +1,13 @@
 ! Copyright (C) 2023 Alexander Ilin.
 ! See https://factorcode.org/license.txt for BSD license.
 USING:
-    arrays kernel make math sequences sorting splitting.monotonic
+    arrays kernel make math namespaces prettyprint.config sequences
+    sorting splitting.monotonic
 ;
 IN: format-using
 
-: indent ( -- str ) "    " ; inline
-: width-limit ( -- n ) 65 ; inline
+: indent ( -- str ) tab-size get [ CHAR: space ] replicate ; inline
+: width-limit ( -- n ) margin get ; inline
 : too-long? ( n -- ? ) width-limit > ; inline
 
 : subsystem ( str -- str' )