static int blockindent(value_t v) { // in this case we switch to block indent mode, where the head // is no longer considered special: // (a b c d e // f g h i j) return (allsmallp(v) > 9); }
static int indentevery(value_t v) { // indent before every subform of a special form, unless every // subform is "small" value_t c = car_(v); if (c == LAMBDA || c == setqsym) return 0; if (c == IF) // TODO: others return !allsmallp(cdr_(v)); return 0; }
static int indentevery(fl_context_t *fl_ctx, value_t v) { // indent before every subform of a special form, unless every // subform is "small" value_t c = car_(v); if (c == fl_ctx->LAMBDA || c == fl_ctx->setqsym) return 0; if (c == fl_ctx->IF) // TODO: others return !allsmallp(fl_ctx, cdr_(v)); return 0; }
static int indentafter2(value_t head, value_t v) { // for certain X always indent (X a b) after a return ((head == definesym || head == defmacrosym) && !allsmallp(cdr_(v))); }
static int indentafter3(value_t head, value_t v) { // for certain X always indent (X a b c) after b return ((head == forsym) && !allsmallp(cdr_(v))); }
static int indentafter2(fl_context_t *fl_ctx, value_t head, value_t v) { // for certain X always indent (X a b) after a return ((head == fl_ctx->definesym || head == fl_ctx->defmacrosym) && !allsmallp(fl_ctx, cdr_(v))); }
static int indentafter3(fl_context_t *fl_ctx, value_t head, value_t v) { // for certain X always indent (X a b c) after b return ((head == fl_ctx->forsym) && !allsmallp(fl_ctx, cdr_(v))); }