comparison src/syntax.c @ 227:ef254e0f2365

updated for version 7.0063
author vimboss
date Tue, 22 Mar 2005 23:03:44 +0000
parents 7fd4b5df33be
children 62a331864307
comparison
equal deleted inserted replaced
226:4e7dca477fee 227:ef254e0f2365
2200 /* 2200 /*
2201 * set "can_spell" to TRUE if spell checking is supposed to be 2201 * set "can_spell" to TRUE if spell checking is supposed to be
2202 * done in the current item. 2202 * done in the current item.
2203 */ 2203 */
2204 2204
2205 /* Always do spelling if there is no @Spell cluster. */ 2205 /* If there is no @Spell cluster: Do spelling for items without
2206 * @NoSpell. Otherwise only in items with @Spell */
2206 if (syn_buf->b_spell_cluster_id == 0) 2207 if (syn_buf->b_spell_cluster_id == 0)
2207 *can_spell = TRUE; 2208 {
2209 if (syn_buf->b_nospell_cluster_id == 0 || current_trans_id == 0)
2210 *can_spell = TRUE;
2211 else
2212 {
2213 sps.inc_tag = 0;
2214 sps.id = syn_buf->b_nospell_cluster_id;
2215 sps.cont_in_list = NULL;
2216 *can_spell = !in_id_list(sip, sip->si_cont_list, &sps, 0);
2217 }
2218 }
2208 else if (current_trans_id == 0) 2219 else if (current_trans_id == 0)
2209 *can_spell = FALSE; 2220 *can_spell = FALSE;
2210 else 2221 else
2211 { 2222 {
2212 sps.inc_tag = 0; 2223 sps.inc_tag = 0;
5092 SYN_CLSTR(curbuf)[len].scl_list = NULL; 5103 SYN_CLSTR(curbuf)[len].scl_list = NULL;
5093 ++curbuf->b_syn_clusters.ga_len; 5104 ++curbuf->b_syn_clusters.ga_len;
5094 5105
5095 if (STRICMP(name, "Spell") == 0) 5106 if (STRICMP(name, "Spell") == 0)
5096 curbuf->b_spell_cluster_id = len + SYNID_CLUSTER; 5107 curbuf->b_spell_cluster_id = len + SYNID_CLUSTER;
5108 if (STRICMP(name, "NoSpell") == 0)
5109 curbuf->b_nospell_cluster_id = len + SYNID_CLUSTER;
5097 5110
5098 return len + SYNID_CLUSTER; 5111 return len + SYNID_CLUSTER;
5099 } 5112 }
5100 5113
5101 /* 5114 /*