/usr/share/anjuta/templates/indent.tpl is in anjuta-common 2:3.22.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | [+ autogen5 template +]
[+DEFINE START-INDENT \+]
[+(out-push-new)\+]
[+ENDDEF \+]
[+DEFINE END-INDENT \+]
[+(for-each
indent
(string-split (out-pop #t) #\nl);
)\+]
[+ENDDEF \+]
[+(define
indentation
(lambda
(tab)
(let*
(
(use-tabs (not (zero? (or (string->number (get "UseTabs")) 8))))
(tab-width (or (string->number (get "TabWidth")) 8))
(indent-width (or (string->number (get "IndentWidth")) 1))
(spaces (* tab indent-width))
(tab-indent (if use-tabs (quotient spaces tab-width) 0))
(space-indent (- spaces (* tab-indent tab-width)))
)
(string-append
(make-string tab-indent #\ht)
(make-string space-indent #\sp)
)
)
)
)
(define
indent
(lambda
(line)
(let
((tab (or (string-skip line #\ht) 0)))
(emit
(string-append
(indentation tab)
(string-drop line tab)
"\n"
)
)
)
)
) \+]
[+DEFINE EMACS-MODELINE \+]
-*- Mode: [+MODE+]; indent-tabs-mode: [+(if (== (get "UseTabs") "1") "t" "nil")+]; c-basic-offset: [+IndentWidth+]; tab-width: [+TabWidth+] -*- [+ENDDEF \+]
|