Re: Patch 7.4.149
Yukihiro Nakadaira wrote: On Wed, Jan 15, 2014 at 3:44 AM, Bram Moolenaar b...@moolenaar.net wrote: Yukihiro Nakadaira wrote: Patch 7.4.149 Problem:Get E685 error when assigning a function to an autoload variable. (Yukihiro Nakadaira) Solution: Instead of having a global no_autoload variable, pass an autoload flag down to where it is used. (ZyX) Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok, src/testdir/test60.in, src/testdir/test60.ok, src/testdir/sautest/autoload/footest.vim Sorry for my late reply. It need additional no_autoload to fix the problem. Thanks. Perhaps we can add a test for your problem? I wrote test for it. Please check the attached patch. Thanks! -- hundred-and-one symptoms of being an internet addict: 167. You have more than 200 websites bookmarked. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Patch 7.4.149
On Tue, Jan 14, 2014 at 11:24 PM, Bram Moolenaar b...@moolenaar.net wrote: Patch 7.4.149 Problem:Get E685 error when assigning a function to an autoload variable. (Yukihiro Nakadaira) Solution: Instead of having a global no_autoload variable, pass an autoload flag down to where it is used. (ZyX) Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok, src/testdir/test60.in, src/testdir/test60.ok, src/testdir/sautest/autoload/footest.vim Sorry for my late reply. It need additional no_autoload to fix the problem. diff -r 98a642716acc src/eval.c --- a/src/eval.cTue Jan 14 15:53:52 2014 +0100 +++ b/src/eval.cWed Jan 15 00:58:24 2014 +0900 @@ -447,7 +447,7 @@ #endif static int get_env_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate)); static int find_internal_func __ARGS((char_u *name)); -static char_u *deref_func_name __ARGS((char_u *name, int *lenp)); +static char_u *deref_func_name __ARGS((char_u *name, int *lenp, int no_autoload)); static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict)); static int call_func __ARGS((char_u *funcname, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict)); static void emsg_funcname __ARGS((char *ermsg, char_u *name)); @@ -3432,7 +3432,7 @@ /* If it is the name of a variable of type VAR_FUNC use its contents. */ len = (int)STRLEN(tofree); -name = deref_func_name(tofree, len); +name = deref_func_name(tofree, len, FALSE); /* Skip white space to allow :call func (). Not good, but required for * backward compatibility. */ @@ -5159,7 +5159,7 @@ { /* If s is the name of a variable of type VAR_FUNC * use its contents. */ -s = deref_func_name(s, len); +s = deref_func_name(s, len, FALSE); /* Invoke the function. */ ret = get_func_tv(s, len, rettv, arg, @@ -8282,16 +8282,17 @@ * name it contains, otherwise return name. */ static char_u * -deref_func_name(name, lenp) +deref_func_name(name, lenp, no_autoload) char_u*name; int*lenp; +intno_autoload; { dictitem_T*v; intcc; cc = name[*lenp]; name[*lenp] = NUL; -v = find_var(name, NULL, FALSE); +v = find_var(name, NULL, no_autoload); name[*lenp] = cc; if (v != NULL v-di_tv.v_type == VAR_FUNC) { @@ -21938,14 +21939,14 @@ if (lv.ll_exp_name != NULL) { len = (int)STRLEN(lv.ll_exp_name); -name = deref_func_name(lv.ll_exp_name, len); +name = deref_func_name(lv.ll_exp_name, len, flags TFN_NO_AUTOLOAD); if (name == lv.ll_exp_name) name = NULL; } else { len = (int)(end - *pp); -name = deref_func_name(*pp, len); +name = deref_func_name(*pp, len, flags TFN_NO_AUTOLOAD); if (name == *pp) name = NULL; } -- Yukihiro Nakadaira - yukihiro.nakada...@gmail.com -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Patch 7.4.149
Yukihiro Nakadaira wrote: Patch 7.4.149 Problem:Get E685 error when assigning a function to an autoload variable. (Yukihiro Nakadaira) Solution: Instead of having a global no_autoload variable, pass an autoload flag down to where it is used. (ZyX) Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok, src/testdir/test60.in, src/testdir/test60.ok, src/testdir/sautest/autoload/footest.vim Sorry for my late reply. It need additional no_autoload to fix the problem. Thanks. Perhaps we can add a test for your problem? -- Send $25.00 for handy leaflet on how to make money by selling leaflets /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Patch 7.4.149
On Wed, Jan 15, 2014 at 3:44 AM, Bram Moolenaar b...@moolenaar.net wrote: Yukihiro Nakadaira wrote: Patch 7.4.149 Problem:Get E685 error when assigning a function to an autoload variable. (Yukihiro Nakadaira) Solution: Instead of having a global no_autoload variable, pass an autoload flag down to where it is used. (ZyX) Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok, src/testdir/test60.in, src/testdir/test60.ok, src/testdir/sautest/autoload/footest.vim Sorry for my late reply. It need additional no_autoload to fix the problem. Thanks. Perhaps we can add a test for your problem? I wrote test for it. Please check the attached patch. -- Yukihiro Nakadaira - yukihiro.nakada...@gmail.com -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups vim_dev group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. diff -r a42040fed96c src/testdir/Make_amiga.mak --- a/src/testdir/Make_amiga.makTue Jan 14 21:31:34 2014 +0100 +++ b/src/testdir/Make_amiga.makWed Jan 15 11:51:47 2014 +0900 @@ -34,7 +34,8 @@ test81.out test82.out test83.out test84.out test88.out \ test89.out test90.out test91.out test92.out test93.out \ test94.out test95.out test96.out test97.out test98.out \ - test99.out test100.out test101.out test102.out test103.out + test99.out test100.out test101.out test102.out test103.out \ + test104.out .SUFFIXES: .in .out @@ -154,3 +155,4 @@ test101.out: test101.in test102.out: test102.in test103.out: test103.in +test104.out: test104.in diff -r a42040fed96c src/testdir/Make_dos.mak --- a/src/testdir/Make_dos.mak Tue Jan 14 21:31:34 2014 +0100 +++ b/src/testdir/Make_dos.mak Wed Jan 15 11:51:47 2014 +0900 @@ -33,7 +33,7 @@ test84.out test85.out test86.out test87.out test88.out \ test89.out test90.out test91.out test92.out test93.out \ test94.out test95.out test96.out test98.out test99.out \ - test100.out test101.out test102.out test103.out + test100.out test101.out test102.out test103.out test104.out SCRIPTS32 =test50.out test70.out diff -r a42040fed96c src/testdir/Make_ming.mak --- a/src/testdir/Make_ming.mak Tue Jan 14 21:31:34 2014 +0100 +++ b/src/testdir/Make_ming.mak Wed Jan 15 11:51:47 2014 +0900 @@ -53,7 +53,7 @@ test84.out test85.out test86.out test87.out test88.out \ test89.out test90.out test91.out test92.out test93.out \ test94.out test95.out test96.out test98.out test99.out \ - test100.out test101.out test102.out test103.out + test100.out test101.out test102.out test103.out test104.out SCRIPTS32 =test50.out test70.out diff -r a42040fed96c src/testdir/Make_os2.mak --- a/src/testdir/Make_os2.mak Tue Jan 14 21:31:34 2014 +0100 +++ b/src/testdir/Make_os2.mak Wed Jan 15 11:51:47 2014 +0900 @@ -35,7 +35,7 @@ test81.out test82.out test83.out test84.out test88.out \ test89.out test90.out test91.out test92.out test93.out \ test94.out test95.out test96.out test98.out test99.out \ - test100.out test101.out test102.out test103.out + test100.out test101.out test102.out test103.out test104.out .SUFFIXES: .in .out diff -r a42040fed96c src/testdir/Make_vms.mms --- a/src/testdir/Make_vms.mms Tue Jan 14 21:31:34 2014 +0100 +++ b/src/testdir/Make_vms.mms Wed Jan 15 11:51:47 2014 +0900 @@ -79,7 +79,7 @@ test82.out test83.out test84.out test88.out test89.out \ test90.out test91.out test92.out test93.out test94.out \ test95.out test96.out test97.out test98.out test99.out \ -test100.out test101.out test102.out test103.out +test100.out test101.out test102.out test103.out test104.out # Known problems: # Test 30: a problem around mac format - unknown reason diff -r a42040fed96c src/testdir/Makefile --- a/src/testdir/Makefile Tue Jan 14 21:31:34 2014 +0100 +++ b/src/testdir/Makefile Wed Jan 15 11:51:47 2014 +0900 @@ -30,7 +30,8 @@ test84.out test85.out test86.out test87.out test88.out \ test89.out test90.out test91.out test92.out test93.out \ test94.out test95.out test96.out test97.out test98.out \ - test99.out test100.out test101.out test102.out test103.out + test99.out test100.out test101.out test102.out test103.out \ + test104.out SCRIPTS_GUI =