comparison src/quickfix.c @ 677:e649c78407e6 v7.0202

updated for version 7.0202
author vimboss
date Mon, 20 Feb 2006 21:37:40 +0000
parents 21ab9abf0f08
children 9364d114ed8d
comparison
equal deleted inserted replaced
676:9cdb8018cdf1 677:e649c78407e6
2885 int duplicate_name = FALSE; 2885 int duplicate_name = FALSE;
2886 int using_dummy; 2886 int using_dummy;
2887 int found_match; 2887 int found_match;
2888 buf_T *first_match_buf = NULL; 2888 buf_T *first_match_buf = NULL;
2889 time_t seconds = 0; 2889 time_t seconds = 0;
2890 int save_mls;
2890 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) 2891 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
2891 char_u *save_ei = NULL; 2892 char_u *save_ei = NULL;
2893 #endif
2894 #ifndef FEAT_AUTOCMD
2895 buf_T *save_curbuf;
2896 #else
2892 aco_save_T aco; 2897 aco_save_T aco;
2893 #endif
2894 #ifdef FEAT_AUTOCMD
2895 char_u *au_name = NULL; 2898 char_u *au_name = NULL;
2896 int flags = 0; 2899 int flags = 0;
2897 colnr_T col; 2900 colnr_T col;
2898 2901
2899 switch (eap->cmdidx) 2902 switch (eap->cmdidx)
2997 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) 3000 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
2998 /* Don't do Filetype autocommands to avoid loading syntax and 3001 /* Don't do Filetype autocommands to avoid loading syntax and
2999 * indent scripts, a great speed improvement. */ 3002 * indent scripts, a great speed improvement. */
3000 save_ei = au_event_disable(",Filetype"); 3003 save_ei = au_event_disable(",Filetype");
3001 #endif 3004 #endif
3005 /* Don't use modelines here, it's useless. */
3006 save_mls = p_mls;
3007 p_mls = 0;
3002 3008
3003 /* Load file into a buffer, so that 'fileencoding' is detected, 3009 /* Load file into a buffer, so that 'fileencoding' is detected,
3004 * autocommands applied, etc. */ 3010 * autocommands applied, etc. */
3005 buf = load_dummy_buffer(fnames[fi]); 3011 buf = load_dummy_buffer(fnames[fi]);
3006 3012
3013 p_mls = save_mls;
3007 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) 3014 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
3008 au_event_restore(save_ei); 3015 au_event_restore(save_ei);
3009 #endif 3016 #endif
3010 } 3017 }
3011 else 3018 else
3087 unload_dummy_buffer(buf); 3094 unload_dummy_buffer(buf);
3088 buf = NULL; 3095 buf = NULL;
3089 } 3096 }
3090 } 3097 }
3091 3098
3092 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
3093 if (buf != NULL) 3099 if (buf != NULL)
3094 { 3100 {
3095 /* The buffer is still loaded, the Filetype autocommands 3101 /* The buffer is still loaded, the Filetype autocommands
3096 * need to be done now, in that buffer. And then the 3102 * need to be done now, in that buffer. And the modelines
3097 * modelines need to be done (again). */ 3103 * need to be done (again). */
3104 #if defined(FEAT_AUTOCMD)
3098 aucmd_prepbuf(&aco, buf); 3105 aucmd_prepbuf(&aco, buf);
3106 #else
3107 save_curbuf = curbuf;
3108 curbuf = buf;
3109 curwin->w_buffer = curbuf;
3110 #endif
3111 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
3099 apply_autocmds(EVENT_FILETYPE, buf->b_p_ft, 3112 apply_autocmds(EVENT_FILETYPE, buf->b_p_ft,
3100 buf->b_fname, TRUE, buf); 3113 buf->b_fname, TRUE, buf);
3114 #endif
3101 do_modelines(FALSE); 3115 do_modelines(FALSE);
3116 #if defined(FEAT_AUTOCMD)
3102 aucmd_restbuf(&aco); 3117 aucmd_restbuf(&aco);
3118 #else
3119 curbuf = save_curbuf;
3120 curwin->w_buffer = curbuf;
3121 #endif
3103 } 3122 }
3104 #endif
3105 } 3123 }
3106 } 3124 }
3107 } 3125 }
3108 3126
3109 FreeWild(fcount, fnames); 3127 FreeWild(fcount, fnames);