diff src/syntax.c @ 8362:a541dd5cfd3a v7.4.1473

commit https://github.com/vim/vim/commit/d1413d90983fc6c579ad66ba4d4611b057197f94 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 2 21:51:56 2016 +0100 patch 7.4.1473 Problem: Can't build without the autocommand feature. Solution: Add #ifdefs. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Wed, 02 Mar 2016 22:00:07 +0100
parents 05b88224cea1
children 260d01c1cd17
line wrap: on
line diff
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -6342,9 +6342,11 @@ ex_ownsyntax(exarg_T *eap)
     if (old_value != NULL)
 	old_value = vim_strsave(old_value);
 
+#ifdef FEAT_AUTOCMD
     /* Apply the "syntax" autocommand event, this finds and loads the syntax
      * file. */
     apply_autocmds(EVENT_SYNTAX, eap->arg, curbuf->b_fname, TRUE, curbuf);
+#endif
 
     /* move value of b:current_syntax to w:current_syntax */
     new_value = get_var_value((char_u *)"b:current_syntax");