4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: The :compiler command doesn't function properly when invoked in a
13 Solution: Add "g:" before "current_compiler". (Yukihiro Nakadaira)
17 *** ../vim-7.2.336/src/ex_cmds2.c 2009-05-16 21:16:12.000000000 +0200
18 --- src/ex_cmds2.c 2010-01-19 16:02:53.000000000 +0100
21 * To remain backwards compatible "current_compiler" is always
22 * used. A user's compiler plugin may set it, the distributed
23 * plugin will then skip the settings. Afterwards set
24 ! * "b:current_compiler" and restore "current_compiler". */
25 ! old_cur_comp = get_var_value((char_u *)"current_compiler");
26 if (old_cur_comp != NULL)
27 old_cur_comp = vim_strsave(old_cur_comp);
28 do_cmdline_cmd((char_u *)
29 "command -nargs=* CompilerSet setlocal <args>");
31 ! do_unlet((char_u *)"current_compiler", TRUE);
32 do_unlet((char_u *)"b:current_compiler", TRUE);
34 sprintf((char *)buf, "compiler/%s.vim", eap->arg);
36 * To remain backwards compatible "current_compiler" is always
37 * used. A user's compiler plugin may set it, the distributed
38 * plugin will then skip the settings. Afterwards set
39 ! * "b:current_compiler" and restore "current_compiler".
40 ! * Explicitly prepend "g:" to make it work in a function. */
41 ! old_cur_comp = get_var_value((char_u *)"g:current_compiler");
42 if (old_cur_comp != NULL)
43 old_cur_comp = vim_strsave(old_cur_comp);
44 do_cmdline_cmd((char_u *)
45 "command -nargs=* CompilerSet setlocal <args>");
47 ! do_unlet((char_u *)"g:current_compiler", TRUE);
48 do_unlet((char_u *)"b:current_compiler", TRUE);
50 sprintf((char *)buf, "compiler/%s.vim", eap->arg);
53 do_cmdline_cmd((char_u *)":delcommand CompilerSet");
55 /* Set "b:current_compiler" from "current_compiler". */
56 ! p = get_var_value((char_u *)"current_compiler");
58 set_internal_string_var((char_u *)"b:current_compiler", p);
61 do_cmdline_cmd((char_u *)":delcommand CompilerSet");
63 /* Set "b:current_compiler" from "current_compiler". */
64 ! p = get_var_value((char_u *)"g:current_compiler");
66 set_internal_string_var((char_u *)"b:current_compiler", p);
71 if (old_cur_comp != NULL)
73 ! set_internal_string_var((char_u *)"current_compiler",
75 vim_free(old_cur_comp);
78 ! do_unlet((char_u *)"current_compiler", TRUE);
84 if (old_cur_comp != NULL)
86 ! set_internal_string_var((char_u *)"g:current_compiler",
88 vim_free(old_cur_comp);
91 ! do_unlet((char_u *)"g:current_compiler", TRUE);
95 *** ../vim-7.2.336/src/version.c 2010-01-19 15:51:29.000000000 +0100
96 --- src/version.c 2010-01-19 16:11:20.000000000 +0100
100 { /* Add new patch number below this line */
106 hundred-and-one symptoms of being an internet addict:
107 121. You ask for e-mail adresses instead of telephone numbers.
109 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
110 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
111 \\\ download, build and distribute -- http://www.A-A-P.org ///
112 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///