From 29b7123647bc3b70911bbb2caf85238d22d160c8 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 29 May 2007 14:16:02 +0000 Subject: 23485: feature completion and autoloading --- Src/exec.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index 751282127..ccba66bf8 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -2012,7 +2012,12 @@ execcmd(Estate state, int input, int output, int how, int last1) /* autoload the builtin if necessary */ if (!((Builtin) hn)->handlerfunc) { - (void)load_module(((Builtin) hn)->optstr, NULL); + /* + * Ensure the module is loaded and the + * feature corresponding to the builtin + * is enabled. + */ + (void)ensurefeature(((Builtin) hn)->optstr, "b:", hn->nam); hn = builtintab->getnode(builtintab, cmdarg); } assign = (hn && (hn->flags & BINF_MAGICEQUALS)); @@ -2229,7 +2234,7 @@ execcmd(Estate state, int input, int output, int how, int last1) /* autoload the builtin if necessary */ if (!((Builtin) hn)->handlerfunc) { - (void)load_module(((Builtin) hn)->optstr, NULL); + (void)ensurefeature(((Builtin) hn)->optstr, "b:", cmdarg); hn = builtintab->getnode(builtintab, cmdarg); } break; -- cgit 1.4.1