]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - vim/patches/vim-7.3.438.patch0
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-3.x
[people/ms/ipfire-3.x.git] / vim / patches / vim-7.3.438.patch0
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.438
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.438
11 Problem: There is no way to avoid ":doautoall" reading modelines.
12 Solution: Add the <nomodeline> argument. Adjust documentation.
13 Files: src/fileio.c, runtime/doc/autocmd.txt
14
15
16 *** ../vim-7.3.437/src/fileio.c 2012-02-11 23:45:30.000000000 +0100
17 --- src/fileio.c 2012-02-12 00:08:17.000000000 +0100
18 ***************
19 *** 8739,8744 ****
20 --- 8739,8752 ----
21 int retval;
22 aco_save_T aco;
23 buf_T *buf;
24 + char_u *arg = eap->arg;
25 + int call_do_modelines = TRUE;
26 +
27 + if (STRNCMP(arg, "<nomodeline>", 12) == 0)
28 + {
29 + call_do_modelines = FALSE;
30 + arg = skipwhite(arg + 12);
31 + }
32
33 /*
34 * This is a bit tricky: For some commands curwin->w_buffer needs to be
35 ***************
36 *** 8755,8765 ****
37 aucmd_prepbuf(&aco, buf);
38
39 /* execute the autocommands for this buffer */
40 ! retval = do_doautocmd(eap->arg, FALSE);
41
42 ! /* Execute the modeline settings, but don't set window-local
43 ! * options if we are using the current window for another buffer. */
44 ! do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0);
45
46 /* restore the current window */
47 aucmd_restbuf(&aco);
48 --- 8763,8777 ----
49 aucmd_prepbuf(&aco, buf);
50
51 /* execute the autocommands for this buffer */
52 ! retval = do_doautocmd(arg, FALSE);
53
54 ! if (call_do_modelines)
55 ! {
56 ! /* Execute the modeline settings, but don't set window-local
57 ! * options if we are using the current window for another
58 ! * buffer. */
59 ! do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0);
60 ! }
61
62 /* restore the current window */
63 aucmd_restbuf(&aco);
64 *** ../vim-7.3.437/runtime/doc/autocmd.txt 2011-05-19 17:25:36.000000000 +0200
65 --- runtime/doc/autocmd.txt 2012-02-12 00:03:45.000000000 +0100
66 ***************
67 *** 1065,1077 ****
68 autocommands for that group. Note: if you use an
69 undefined group name, Vim gives you an error message.
70
71 - After applying the autocommands the modelines are
72 - processed, so that their settings overrule the
73 - settings from autocommands, like what happens when
74 - editing a file.
75 -
76 *:doautoa* *:doautoall*
77 ! :doautoa[ll] [group] {event} [fname]
78 Like ":doautocmd", but apply the autocommands to each
79 loaded buffer. Note that [fname] is used to select
80 the autocommands, not the buffers to which they are
81 --- 1073,1080 ----
82 autocommands for that group. Note: if you use an
83 undefined group name, Vim gives you an error message.
84
85 *:doautoa* *:doautoall*
86 ! :doautoa[ll] [<nomodeline>] [group] {event} [fname]
87 Like ":doautocmd", but apply the autocommands to each
88 loaded buffer. Note that [fname] is used to select
89 the autocommands, not the buffers to which they are
90 ***************
91 *** 1082,1087 ****
92 --- 1085,1096 ----
93 This command is intended for autocommands that set
94 options, change highlighting, and things like that.
95
96 + After applying the autocommands the modelines are
97 + processed, so that their settings overrule the
98 + settings from autocommands, like what happens when
99 + editing a file. This is skipped when the <nomodeline>
100 + argument is present.
101 +
102 ==============================================================================
103 10. Using autocommands *autocmd-use*
104
105 *** ../vim-7.3.437/src/version.c 2012-02-11 23:45:30.000000000 +0100
106 --- src/version.c 2012-02-12 00:16:04.000000000 +0100
107 ***************
108 *** 716,717 ****
109 --- 716,719 ----
110 { /* Add new patch number below this line */
111 + /**/
112 + 438,
113 /**/
114
115 --
116 "Oh, no! NOT the Spanish Inquisition!"
117 "NOBODY expects the Spanish Inquisition!!!"
118 -- Monty Python sketch --
119 "Oh, no! NOT another option!"
120 "EVERYBODY expects another option!!!"
121 -- Discussion in vim-dev mailing list --
122
123 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
124 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
125 \\\ an exciting new programming language -- http://www.Zimbu.org ///
126 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///