@@ -2180,9 +2180,9 @@ spell_move_to(wp, dir, allwords, curline, attrp)
21802180 char_u * endp ;
21812181 hlf_T attr ;
21822182 int len ;
2183- # ifdef FEAT_SYN_HL
2183+ #ifdef FEAT_SYN_HL
21842184 int has_syntax = syntax_present (wp );
2185- # endif
2185+ #endif
21862186 int col ;
21872187 int can_spell ;
21882188 char_u * buf = NULL ;
@@ -2280,7 +2280,7 @@ spell_move_to(wp, dir, allwords, curline, attrp)
22802280 : p - buf )
22812281 > wp -> w_cursor .col )))
22822282 {
2283- # ifdef FEAT_SYN_HL
2283+ #ifdef FEAT_SYN_HL
22842284 if (has_syntax )
22852285 {
22862286 col = (int )(p - buf );
@@ -4701,7 +4701,25 @@ badword_captype(word, end)
47014701 return flags ;
47024702}
47034703
4704- # if defined(FEAT_MBYTE ) || defined(EXITFREE ) || defined(PROTO )
4704+ /*
4705+ * Delete the internal wordlist and its .spl file.
4706+ */
4707+ void
4708+ spell_delete_wordlist ()
4709+ {
4710+ char_u fname [MAXPATHL ];
4711+
4712+ if (int_wordlist != NULL )
4713+ {
4714+ mch_remove (int_wordlist );
4715+ int_wordlist_spl (fname );
4716+ mch_remove (fname );
4717+ vim_free (int_wordlist );
4718+ int_wordlist = NULL ;
4719+ }
4720+ }
4721+
4722+ #if defined(FEAT_MBYTE ) || defined(EXITFREE ) || defined(PROTO )
47054723/*
47064724 * Free all languages.
47074725 */
@@ -4710,7 +4728,6 @@ spell_free_all()
47104728{
47114729 slang_T * slang ;
47124730 buf_T * buf ;
4713- char_u fname [MAXPATHL ];
47144731
47154732 /* Go through all buffers and handle 'spelllang'. <VN> */
47164733 for (buf = firstbuf ; buf != NULL ; buf = buf -> b_next )
@@ -4723,24 +4740,16 @@ spell_free_all()
47234740 slang_free (slang );
47244741 }
47254742
4726- if (int_wordlist != NULL )
4727- {
4728- /* Delete the internal wordlist and its .spl file */
4729- mch_remove (int_wordlist );
4730- int_wordlist_spl (fname );
4731- mch_remove (fname );
4732- vim_free (int_wordlist );
4733- int_wordlist = NULL ;
4734- }
4743+ spell_delete_wordlist ();
47354744
47364745 vim_free (repl_to );
47374746 repl_to = NULL ;
47384747 vim_free (repl_from );
47394748 repl_from = NULL ;
47404749}
4741- # endif
4750+ #endif
47424751
4743- # if defined(FEAT_MBYTE ) || defined(PROTO )
4752+ #if defined(FEAT_MBYTE ) || defined(PROTO )
47444753/*
47454754 * Clear all spelling tables and reload them.
47464755 * Used after 'encoding' is set and when ":mkspell" was used.
@@ -4773,7 +4782,7 @@ spell_reload()
47734782 }
47744783 }
47754784}
4776- # endif
4785+ #endif
47774786
47784787/*
47794788 * Reload the spell file "fname" if it's loaded.
0 commit comments