comparison src/spell.c @ 9649:fd9727ae3c49 v7.4.2101

commit https://github.com/vim/vim/commit/2932359000b2f918d5fade79ea4d124d5943cd07 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 24 22:04:11 2016 +0200 patch 7.4.2101 Problem: Looping over windows, buffers and tab pages is inconsistant. Solution: Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Sun, 24 Jul 2016 22:15:07 +0200
parents b0c7061d6439
children bff8a09016a5
comparison
equal deleted inserted replaced
9648:227649fd4301 9649:fd9727ae3c49
2873 { 2873 {
2874 slang_T *slang; 2874 slang_T *slang;
2875 buf_T *buf; 2875 buf_T *buf;
2876 2876
2877 /* Go through all buffers and handle 'spelllang'. <VN> */ 2877 /* Go through all buffers and handle 'spelllang'. <VN> */
2878 for (buf = firstbuf; buf != NULL; buf = buf->b_next) 2878 FOR_ALL_BUFFERS(buf)
2879 ga_clear(&buf->b_s.b_langp); 2879 ga_clear(&buf->b_s.b_langp);
2880 2880
2881 while (first_lang != NULL) 2881 while (first_lang != NULL)
2882 { 2882 {
2883 slang = first_lang; 2883 slang = first_lang;
2909 2909
2910 /* Unload all allocated memory. */ 2910 /* Unload all allocated memory. */
2911 spell_free_all(); 2911 spell_free_all();
2912 2912
2913 /* Go through all buffers and handle 'spelllang'. */ 2913 /* Go through all buffers and handle 'spelllang'. */
2914 for (wp = firstwin; wp != NULL; wp = wp->w_next) 2914 FOR_ALL_WINDOWS(wp)
2915 { 2915 {
2916 /* Only load the wordlists when 'spelllang' is set and there is a 2916 /* Only load the wordlists when 'spelllang' is set and there is a
2917 * window for this buffer in which 'spell' is set. */ 2917 * window for this buffer in which 'spell' is set. */
2918 if (*wp->w_s->b_p_spl != NUL) 2918 if (*wp->w_s->b_p_spl != NUL)
2919 { 2919 {