Mercurial > vim
comparison src/buffer.c @ 28942:6cdf55afaae9 v8.2.4993
patch 8.2.4993: smart/C/lisp indenting is optional
Commit: https://github.com/vim/vim/commit/8e145b82464a21ee4fdf7948f04e2a1d505f8bfa
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 21 20:17:31 2022 +0100
patch 8.2.4993: smart/C/lisp indenting is optional
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 21 May 2022 21:30:04 +0200 |
parents | c3570bdc93eb |
children | ad99b7b9df13 |
comparison
equal
deleted
inserted
replaced
28941:f17de8647585 | 28942:6cdf55afaae9 |
---|---|
288 | 288 |
289 // if first time loading this buffer, init b_chartab[] | 289 // if first time loading this buffer, init b_chartab[] |
290 if (curbuf->b_flags & BF_NEVERLOADED) | 290 if (curbuf->b_flags & BF_NEVERLOADED) |
291 { | 291 { |
292 (void)buf_init_chartab(curbuf, FALSE); | 292 (void)buf_init_chartab(curbuf, FALSE); |
293 #ifdef FEAT_CINDENT | |
294 parse_cino(curbuf); | 293 parse_cino(curbuf); |
295 #endif | |
296 } | 294 } |
297 | 295 |
298 // Set/reset the Changed flag first, autocmds may change the buffer. | 296 // Set/reset the Changed flag first, autocmds may change the buffer. |
299 // Apply the automatic commands, before processing the modelines. | 297 // Apply the automatic commands, before processing the modelines. |
300 // So the modelines have priority over autocommands. | 298 // So the modelines have priority over autocommands. |
2272 clear_string_option(&buf->b_p_inc); | 2270 clear_string_option(&buf->b_p_inc); |
2273 # ifdef FEAT_EVAL | 2271 # ifdef FEAT_EVAL |
2274 clear_string_option(&buf->b_p_inex); | 2272 clear_string_option(&buf->b_p_inex); |
2275 # endif | 2273 # endif |
2276 #endif | 2274 #endif |
2277 #if defined(FEAT_CINDENT) && defined(FEAT_EVAL) | 2275 #if defined(FEAT_EVAL) |
2278 clear_string_option(&buf->b_p_inde); | 2276 clear_string_option(&buf->b_p_inde); |
2279 clear_string_option(&buf->b_p_indk); | 2277 clear_string_option(&buf->b_p_indk); |
2280 #endif | 2278 #endif |
2281 #if defined(FEAT_BEVAL) && defined(FEAT_EVAL) | 2279 #if defined(FEAT_BEVAL) && defined(FEAT_EVAL) |
2282 clear_string_option(&buf->b_p_bexpr); | 2280 clear_string_option(&buf->b_p_bexpr); |
2333 #endif | 2331 #endif |
2334 #ifdef FEAT_SEARCHPATH | 2332 #ifdef FEAT_SEARCHPATH |
2335 clear_string_option(&buf->b_p_sua); | 2333 clear_string_option(&buf->b_p_sua); |
2336 #endif | 2334 #endif |
2337 clear_string_option(&buf->b_p_ft); | 2335 clear_string_option(&buf->b_p_ft); |
2338 #ifdef FEAT_CINDENT | |
2339 clear_string_option(&buf->b_p_cink); | 2336 clear_string_option(&buf->b_p_cink); |
2340 clear_string_option(&buf->b_p_cino); | 2337 clear_string_option(&buf->b_p_cino); |
2341 clear_string_option(&buf->b_p_cinsd); | 2338 clear_string_option(&buf->b_p_cinsd); |
2342 #endif | |
2343 #if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT) | |
2344 clear_string_option(&buf->b_p_cinw); | 2339 clear_string_option(&buf->b_p_cinw); |
2345 #endif | |
2346 clear_string_option(&buf->b_p_cpt); | 2340 clear_string_option(&buf->b_p_cpt); |
2347 #ifdef FEAT_COMPL_FUNC | 2341 #ifdef FEAT_COMPL_FUNC |
2348 clear_string_option(&buf->b_p_cfu); | 2342 clear_string_option(&buf->b_p_cfu); |
2349 free_callback(&buf->b_cfu_cb); | 2343 free_callback(&buf->b_cfu_cb); |
2350 clear_string_option(&buf->b_p_ofu); | 2344 clear_string_option(&buf->b_p_ofu); |
2370 #ifdef FEAT_TEXTOBJ | 2364 #ifdef FEAT_TEXTOBJ |
2371 clear_string_option(&buf->b_p_qe); | 2365 clear_string_option(&buf->b_p_qe); |
2372 #endif | 2366 #endif |
2373 buf->b_p_ar = -1; | 2367 buf->b_p_ar = -1; |
2374 buf->b_p_ul = NO_LOCAL_UNDOLEVEL; | 2368 buf->b_p_ul = NO_LOCAL_UNDOLEVEL; |
2375 #ifdef FEAT_LISP | |
2376 clear_string_option(&buf->b_p_lw); | 2369 clear_string_option(&buf->b_p_lw); |
2377 #endif | |
2378 clear_string_option(&buf->b_p_bkc); | 2370 clear_string_option(&buf->b_p_bkc); |
2379 clear_string_option(&buf->b_p_menc); | 2371 clear_string_option(&buf->b_p_menc); |
2380 } | 2372 } |
2381 | 2373 |
2382 /* | 2374 /* |