Mercurial > vim
comparison src/userfunc.c @ 13380:69517d67421f v8.0.1564
patch 8.0.1564: too many #ifdefs
commit https://github.com/vim/vim/commit/f2bd8ef2b4507d02c6043affff8f7e85e3414d5f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 4 18:08:14 2018 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 04 Mar 2018 18:15:08 +0100 |
parents | 69278c25429d |
children | ade79e3e3b88 |
comparison
equal
deleted
inserted
replaced
13379:0f9dd1b43244 | 13380:69517d67421f |
---|---|
1370 if (partial != NULL && partial->pt_func != NULL) | 1370 if (partial != NULL && partial->pt_func != NULL) |
1371 fp = partial->pt_func; | 1371 fp = partial->pt_func; |
1372 else | 1372 else |
1373 fp = find_func(rfname); | 1373 fp = find_func(rfname); |
1374 | 1374 |
1375 #ifdef FEAT_AUTOCMD | |
1376 /* Trigger FuncUndefined event, may load the function. */ | 1375 /* Trigger FuncUndefined event, may load the function. */ |
1377 if (fp == NULL | 1376 if (fp == NULL |
1378 && apply_autocmds(EVENT_FUNCUNDEFINED, | 1377 && apply_autocmds(EVENT_FUNCUNDEFINED, |
1379 rfname, rfname, TRUE, NULL) | 1378 rfname, rfname, TRUE, NULL) |
1380 && !aborting()) | 1379 && !aborting()) |
1381 { | 1380 { |
1382 /* executed an autocommand, search for the function again */ | 1381 /* executed an autocommand, search for the function again */ |
1383 fp = find_func(rfname); | 1382 fp = find_func(rfname); |
1384 } | 1383 } |
1385 #endif | |
1386 /* Try loading a package. */ | 1384 /* Try loading a package. */ |
1387 if (fp == NULL && script_autoload(rfname, TRUE) && !aborting()) | 1385 if (fp == NULL && script_autoload(rfname, TRUE) && !aborting()) |
1388 { | 1386 { |
1389 /* loaded a package, search for the function again */ | 1387 /* loaded a package, search for the function again */ |
1390 fp = find_func(rfname); | 1388 fp = find_func(rfname); |