comparison src/fileio.c @ 123:f67f8a8d81ba

updated for version 7.0043
author vimboss
date Fri, 21 Jan 2005 11:55:25 +0000
parents f529edb9bab3
children 19670b05ee32
comparison
equal deleted inserted replaced
122:56eb9755174b 123:f67f8a8d81ba
7130 return FAIL; 7130 return FAIL;
7131 7131
7132 return OK; 7132 return OK;
7133 } 7133 }
7134 7134
7135 # if defined(FEAT_SYN_HL) || defined(PROTO)
7136
7137 /*
7138 * Add "what" to 'eventignore' to skip loading syntax highlighting for every
7139 * buffer loaded into the window. "what" must start with a comma.
7140 * Returns the old value of 'eventignore' in allocated memory.
7141 */
7142 char_u *
7143 au_event_disable(what)
7144 char *what;
7145 {
7146 char_u *new_ei;
7147 char_u *save_ei;
7148
7149 save_ei = vim_strsave(p_ei);
7150 if (save_ei != NULL)
7151 {
7152 new_ei = vim_strnsave(p_ei, (int)STRLEN(p_ei) + 8);
7153 if (new_ei != NULL)
7154 {
7155 STRCAT(new_ei, what);
7156 set_string_option_direct((char_u *)"ei", -1, new_ei, OPT_FREE);
7157 vim_free(new_ei);
7158 }
7159 }
7160 return save_ei;
7161 }
7162
7163 void
7164 au_event_restore(old_ei)
7165 char_u *old_ei;
7166 {
7167 if (old_ei != NULL)
7168 {
7169 set_string_option_direct((char_u *)"ei", -1, old_ei, OPT_FREE);
7170 apply_autocmds(EVENT_SYNTAX, curbuf->b_p_syn,
7171 curbuf->b_fname, TRUE, curbuf);
7172 vim_free(old_ei);
7173 }
7174 }
7175 # endif /* FEAT_SYN_HL */
7176
7135 /* 7177 /*
7136 * do_autocmd() -- implements the :autocmd command. Can be used in the 7178 * do_autocmd() -- implements the :autocmd command. Can be used in the
7137 * following ways: 7179 * following ways:
7138 * 7180 *
7139 * :autocmd <event> <pat> <cmd> Add <cmd> to the list of commands that 7181 * :autocmd <event> <pat> <cmd> Add <cmd> to the list of commands that