Mercurial > vim
comparison src/ex_cmds2.c @ 819:23f82b5d2814 v7.0c10
updated for version 7.0c10
author | vimboss |
---|---|
date | Wed, 05 Apr 2006 20:41:53 +0000 |
parents | f19994020dad |
children | 9ab23f1e137f |
comparison
equal
deleted
inserted
replaced
818:1f929f3ca806 | 819:23f82b5d2814 |
---|---|
2221 return; | 2221 return; |
2222 } | 2222 } |
2223 #endif | 2223 #endif |
2224 | 2224 |
2225 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) | 2225 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) |
2226 if (eap->cmdidx != CMD_windo) | 2226 if (eap->cmdidx != CMD_windo && eap->cmdidx != CMD_tabdo) |
2227 /* Don't do syntax HL autocommands. Skipping the syntax file is a | 2227 /* Don't do syntax HL autocommands. Skipping the syntax file is a |
2228 * great speed improvement. */ | 2228 * great speed improvement. */ |
2229 save_ei = au_event_disable(",Syntax"); | 2229 save_ei = au_event_disable(",Syntax"); |
2230 #endif | 2230 #endif |
2231 | 2231 |
2484 static void | 2484 static void |
2485 source_callback(fname, cookie) | 2485 source_callback(fname, cookie) |
2486 char_u *fname; | 2486 char_u *fname; |
2487 void *cookie; | 2487 void *cookie; |
2488 { | 2488 { |
2489 (void)do_source(fname, FALSE, FALSE); | 2489 (void)do_source(fname, FALSE, DOSO_NONE); |
2490 } | 2490 } |
2491 | 2491 |
2492 /* | 2492 /* |
2493 * Source the file "name" from all directories in 'runtimepath'. | 2493 * Source the file "name" from all directories in 'runtimepath'. |
2494 * "name" can contain wildcards. | 2494 * "name" can contain wildcards. |
2667 || eap->cstack->cs_idx >= 0 | 2667 || eap->cstack->cs_idx >= 0 |
2668 #endif | 2668 #endif |
2669 ); | 2669 ); |
2670 | 2670 |
2671 /* ":source" read ex commands */ | 2671 /* ":source" read ex commands */ |
2672 else if (do_source(fname, FALSE, FALSE) == FAIL) | 2672 else if (do_source(fname, FALSE, DOSO_NONE) == FAIL) |
2673 EMSG2(_(e_notopen), fname); | 2673 EMSG2(_(e_notopen), fname); |
2674 } | 2674 } |
2675 | 2675 |
2676 /* | 2676 /* |
2677 * ":source" and associated commands. | 2677 * ":source" and associated commands. |
2764 */ | 2764 */ |
2765 int | 2765 int |
2766 do_source(fname, check_other, is_vimrc) | 2766 do_source(fname, check_other, is_vimrc) |
2767 char_u *fname; | 2767 char_u *fname; |
2768 int check_other; /* check for .vimrc and _vimrc */ | 2768 int check_other; /* check for .vimrc and _vimrc */ |
2769 int is_vimrc; /* call vimrc_found() when file exists */ | 2769 int is_vimrc; /* DOSO_ value */ |
2770 { | 2770 { |
2771 struct source_cookie cookie; | 2771 struct source_cookie cookie; |
2772 char_u *save_sourcing_name; | 2772 char_u *save_sourcing_name; |
2773 linenr_T save_sourcing_lnum; | 2773 linenr_T save_sourcing_lnum; |
2774 char_u *p; | 2774 char_u *p; |
2871 else | 2871 else |
2872 smsg((char_u *)_("line %ld: sourcing \"%s\""), | 2872 smsg((char_u *)_("line %ld: sourcing \"%s\""), |
2873 sourcing_lnum, fname); | 2873 sourcing_lnum, fname); |
2874 verbose_leave(); | 2874 verbose_leave(); |
2875 } | 2875 } |
2876 if (is_vimrc) | 2876 if (is_vimrc == DOSO_VIMRC) |
2877 vimrc_found(); | 2877 vimrc_found(fname_exp, (char_u *)"MYVIMRC"); |
2878 else if (is_vimrc == DOSO_GVIMRC) | |
2879 vimrc_found(fname_exp, (char_u *)"MYGVIMRC"); | |
2878 | 2880 |
2879 #ifdef USE_CRNL | 2881 #ifdef USE_CRNL |
2880 /* If no automatic file format: Set default to CR-NL. */ | 2882 /* If no automatic file format: Set default to CR-NL. */ |
2881 if (*p_ffs == NUL) | 2883 if (*p_ffs == NUL) |
2882 cookie.fileformat = EOL_DOS; | 2884 cookie.fileformat = EOL_DOS; |