1 [+ autogen5 template +]
2 [+DEFINE START-INDENT \+]
5 [+DEFINE END-INDENT \+]
8 (string-split (out-pop #t) #\nl);
17 (use-tabs (not (zero? (or (string->number (get "UseTabs")) 8))))
18 (tab-width (or (string->number (get "TabWidth")) 8))
19 (indent-width (or (string->number (get "IndentWidth")) 1))
20 (spaces (* tab indent-width))
21 (tab-indent (if use-tabs (quotient spaces tab-width) 0))
22 (space-indent (- spaces (* tab-indent tab-width)))
25 (make-string tab-indent #\ht)
26 (make-string space-indent #\sp)
36 ((tab (or (string-skip line #\ht) 0)))
40 (string-drop line tab)
47 [+DEFINE EMACS-MODELINE \+]
48 -*- Mode: [+MODE+]; indent-tabs-mode: [+(if (== (get "UseTabs") "1") "t" "nil")+]; c-basic-offset: [+IndentWidth+]; tab-width: [+TabWidth+] -*- [+ENDDEF \+]