patch 8.0.1564: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate the +autocmd feature. Takes away 450 #ifdefs and
increases code size of tiny Vim by only 40 Kbyte.
diff --git a/src/memline.c b/src/memline.c
index 7ea94ab..5ecb32c 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1732,13 +1732,11 @@
}
if (serious_error && called_from_main)
ml_close(curbuf, TRUE);
-#ifdef FEAT_AUTOCMD
else
{
apply_autocmds(EVENT_BUFREADPOST, NULL, curbuf->b_fname, FALSE, curbuf);
apply_autocmds(EVENT_BUFWINENTER, NULL, curbuf->b_fname, FALSE, curbuf);
}
-#endif
return;
}
@@ -4071,7 +4069,7 @@
--no_wait_return;
}
-#ifdef FEAT_AUTOCMD
+#if defined(FEAT_EVAL)
static int do_swapexists(buf_T *buf, char_u *fname);
/*
@@ -4450,7 +4448,7 @@
#if (defined(UNIX) || defined(VMS)) && (defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG))
process_still_running = FALSE;
#endif
-#ifdef FEAT_AUTOCMD
+#if defined(FEAT_EVAL)
/*
* If there is an SwapExists autocommand and we can handle
* the response, trigger it. It may return 0 to ask the