summaryrefslogtreecommitdiffstats
path: root/src/spell.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-02 18:50:46 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-02 18:50:46 +0200
commitaeea72151c31d686bcbb7b06d895006d7363585c (patch)
tree500d487503a1a82cecc8f2a3e9bf89b50638fe5a /src/spell.c
parentf10806b25090879fdc1a86cc0da2f4f34fd21921 (diff)
patch 8.2.0500: using the same loop in many placesv8.2.0500
Problem: Using the same loop in many places. Solution: Define more FOR_ALL macros. (Yegappan Lakshmanan, closes #5339)
Diffstat (limited to 'src/spell.c')
-rw-r--r--src/spell.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/spell.c b/src/spell.c
index 5fdcc3adae..99e030f911 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -2031,7 +2031,7 @@ did_set_spelllang(win_T *wp)
dont_use_region = TRUE;
// Check if we loaded this language before.
- for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+ FOR_ALL_SPELL_LANGS(slang)
if (fullpathcmp(lang, slang->sl_fname, FALSE, TRUE) == FPC_SAME)
break;
}
@@ -2048,7 +2048,7 @@ did_set_spelllang(win_T *wp)
dont_use_region = TRUE;
// Check if we loaded this language before.
- for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+ FOR_ALL_SPELL_LANGS(slang)
if (STRICMP(lang, slang->sl_name) == 0)
break;
}
@@ -2083,7 +2083,7 @@ did_set_spelllang(win_T *wp)
/*
* Loop over the languages, there can be several files for "lang".
*/
- for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+ FOR_ALL_SPELL_LANGS(slang)
if (filename ? fullpathcmp(lang, slang->sl_fname, FALSE, TRUE)
== FPC_SAME
: STRICMP(lang, slang->sl_name) == 0)
@@ -2162,7 +2162,7 @@ did_set_spelllang(win_T *wp)
}
// Check if it was loaded already.
- for (slang = first_lang; slang != NULL; slang = slang->sl_next)
+ FOR_ALL_SPELL_LANGS(slang)
if (fullpathcmp(spf_name, slang->sl_fname, FALSE, TRUE)
== FPC_SAME)
break;