@@ -1414,18 +1414,14 @@ open_line(
14141414 int n ;
14151415 int trunc_line = FALSE; // truncate current line afterwards
14161416 int retval = FAIL ; // return value
1417- #ifdef FEAT_COMMENTS
14181417 int extra_len = 0 ; // length of p_extra string
14191418 int lead_len ; // length of comment leader
14201419 char_u * lead_flags ; // position in 'comments' for comment leader
14211420 char_u * leader = NULL ; // copy of comment leader
1422- #endif
14231421 char_u * allocated = NULL ; // allocated memory
14241422 char_u * p ;
14251423 int saved_char = NUL ; // init for GCC
1426- #if defined(FEAT_SMARTINDENT ) || defined(FEAT_COMMENTS )
14271424 pos_T * pos ;
1428- #endif
14291425#ifdef FEAT_SMARTINDENT
14301426 int do_si = (!p_paste && curbuf -> b_p_si
14311427# ifdef FEAT_CINDENT
@@ -1493,9 +1489,7 @@ open_line(
14931489 first_char = * p ;
14941490 }
14951491#endif
1496- #ifdef FEAT_COMMENTS
14971492 extra_len = (int )STRLEN (p_extra );
1498- #endif
14991493 saved_char = * p_extra ;
15001494 * p_extra = NUL ;
15011495 }
@@ -1544,27 +1538,20 @@ open_line(
15441538
15451539 old_cursor = curwin -> w_cursor ;
15461540 ptr = saved_line ;
1547- # ifdef FEAT_COMMENTS
15481541 if (flags & OPENLINE_DO_COM )
15491542 lead_len = get_leader_len (ptr , NULL , FALSE, TRUE);
15501543 else
15511544 lead_len = 0 ;
1552- # endif
15531545 if (dir == FORWARD )
15541546 {
15551547 // Skip preprocessor directives, unless they are
15561548 // recognised as comments.
1557- if (
1558- # ifdef FEAT_COMMENTS
1559- lead_len == 0 &&
1560- # endif
1561- ptr [0 ] == '#' )
1549+ if ( lead_len == 0 && ptr [0 ] == '#' )
15621550 {
15631551 while (ptr [0 ] == '#' && curwin -> w_cursor .lnum > 1 )
15641552 ptr = ml_get (-- curwin -> w_cursor .lnum );
15651553 newindent = get_indent ();
15661554 }
1567- # ifdef FEAT_COMMENTS
15681555 if (flags & OPENLINE_DO_COM )
15691556 lead_len = get_leader_len (ptr , NULL , FALSE, TRUE);
15701557 else
@@ -1600,7 +1587,6 @@ open_line(
16001587 }
16011588 }
16021589 else // Not a comment line
1603- # endif
16041590 {
16051591 // Find last non-blank in line
16061592 p = ptr + STRLEN (ptr ) - 1 ;
@@ -1651,11 +1637,7 @@ open_line(
16511637 {
16521638 // Skip preprocessor directives, unless they are
16531639 // recognised as comments.
1654- if (
1655- # ifdef FEAT_COMMENTS
1656- lead_len == 0 &&
1657- # endif
1658- ptr [0 ] == '#' )
1640+ if (lead_len == 0 && ptr [0 ] == '#' )
16591641 {
16601642 int was_backslashed = FALSE;
16611643
@@ -1688,7 +1670,6 @@ open_line(
16881670 did_ai = TRUE;
16891671 }
16901672
1691- #ifdef FEAT_COMMENTS
16921673 // Find out if the current line starts with a comment leader.
16931674 // This may then be inserted in front of the new line.
16941675 end_comment_pending = NUL ;
@@ -2086,7 +2067,6 @@ open_line(
20862067 }
20872068 }
20882069 }
2089- #endif
20902070
20912071 // (State == INSERT || State == REPLACE), only when dir == FORWARD
20922072 if (p_extra != NULL )
@@ -2120,7 +2100,6 @@ open_line(
21202100 if (p_extra == NULL )
21212101 p_extra = (char_u * )"" ; // append empty line
21222102
2123- #ifdef FEAT_COMMENTS
21242103 // concatenate leader and p_extra, if there is a leader
21252104 if (lead_len )
21262105 {
@@ -2147,7 +2126,6 @@ open_line(
21472126 }
21482127 else
21492128 end_comment_pending = NUL ; // turns out there was no leader
2150- #endif
21512129
21522130 old_cursor = curwin -> w_cursor ;
21532131 if (dir == BACKWARD )
@@ -2237,13 +2215,11 @@ open_line(
22372215#endif
22382216 }
22392217
2240- #ifdef FEAT_COMMENTS
22412218 // In REPLACE mode, for each character in the extra leader, there must be
22422219 // a NUL on the replace stack, for when it is deleted with BS.
22432220 if (REPLACE_NORMAL (State ))
22442221 while (lead_len -- > 0 )
22452222 replace_push (NUL );
2246- #endif
22472223
22482224 curwin -> w_cursor = old_cursor ;
22492225
@@ -2299,9 +2275,7 @@ open_line(
22992275#ifdef FEAT_LISP
23002276 // May do lisp indenting.
23012277 if (!p_paste
2302- # ifdef FEAT_COMMENTS
23032278 && leader == NULL
2304- # endif
23052279 && curbuf -> b_p_lisp
23062280 && curbuf -> b_p_ai )
23072281 {
0 commit comments