summaryrefslogtreecommitdiffstats
path: root/src/cindent.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-05-21 20:17:31 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-21 20:17:31 +0100
commit8e145b82464a21ee4fdf7948f04e2a1d505f8bfa (patch)
tree833d3862b868395323a8670c15af4b30f1d5564e /src/cindent.c
parent5a01caa90428a5f87600528d68529383c0b2f78c (diff)
patch 8.2.4993: smart/C/lisp indenting is optionalv8.2.4993
Problem: smart/C/lisp indenting is optional, which makes the code more complex, while it only reduces the executable size a bit. Solution: Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP.
Diffstat (limited to 'src/cindent.c')
-rw-r--r--src/cindent.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/cindent.c b/src/cindent.c
index 2d47e641be..27e8a7b276 100644
--- a/src/cindent.c
+++ b/src/cindent.c
@@ -32,7 +32,6 @@
#define LOOKFOR_JS_KEY 11
#define LOOKFOR_COMMA 12
-#if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT)
/*
* Return TRUE if the string "line" starts with a word from 'cinwords'.
*/
@@ -64,7 +63,6 @@ cin_is_cinword(char_u *line)
}
return retval;
}
-#endif
/*
* Skip to the end of a "string" and a 'c' character.
@@ -148,8 +146,6 @@ is_pos_in_string(char_u *line, colnr_T col)
return !((colnr_T)(p - line) <= col);
}
-#if defined(FEAT_CINDENT) || defined(FEAT_SYN_HL)
-
/*
* Find the start of a comment, not knowing if we are in a comment right now.
* Search starts at w_cursor.lnum and goes backwards.
@@ -254,9 +250,7 @@ ind_find_start_CORS(linenr_T *is_raw) // XXX
}
return comment_pos;
}
-#endif // FEAT_CINDENT || FEAT_SYN_HL
-#if defined(FEAT_CINDENT) || defined(PROTO)
/*
* Return TRUE if C-indenting is on.
@@ -265,9 +259,9 @@ ind_find_start_CORS(linenr_T *is_raw) // XXX
cindent_on(void)
{
return (!p_paste && (curbuf->b_p_cin
-# ifdef FEAT_EVAL
+#ifdef FEAT_EVAL
|| *curbuf->b_p_inde != NUL
-# endif
+#endif
));
}
@@ -4151,7 +4145,6 @@ do_c_expr_indent(void)
# endif
fixthisline(get_c_indent);
}
-#endif
#if defined(FEAT_EVAL) || defined(PROTO)
/*
@@ -4160,7 +4153,6 @@ do_c_expr_indent(void)
void
f_cindent(typval_T *argvars UNUSED, typval_T *rettv)
{
-# ifdef FEAT_CINDENT
pos_T pos;
linenr_T lnum;
@@ -4176,7 +4168,6 @@ f_cindent(typval_T *argvars UNUSED, typval_T *rettv)
curwin->w_cursor = pos;
}
else
-# endif
rettv->vval.v_number = -1;
}
#endif