]>
Commit | Line | Data |
---|---|---|
d57b4abe ER |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.1.217 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.1.217 | |
11 | Problem: The "help-tags" tag may be missing from runtime/doc/tags when it | |
12 | was generated during "make install". | |
13 | Solution: Add the "++t" argument to ":helptags" to force adding the tag. | |
14 | Files: runtime/doc/Makefile, runtime/doc/various.txt, src/ex_cmds.c, | |
15 | src/ex_cmds.h | |
16 | ||
17 | ||
18 | *** ../vim-7.1.216/runtime/doc/Makefile Sat May 5 19:14:15 2007 | |
19 | --- runtime/doc/Makefile Fri Jan 11 20:55:34 2008 | |
20 | *************** | |
21 | *** 301,307 **** | |
22 | # Use Vim to generate the tags file. Can only be used when Vim has been | |
23 | # compiled and installed. Supports multiple languages. | |
24 | vimtags: $(DOCS) | |
25 | ! $(VIMEXE) -u NONE -esX -c "helptags ." -c quit | |
26 | ||
27 | # Use "doctags" to generate the tags file. Only works for English! | |
28 | tags: doctags $(DOCS) | |
29 | --- 301,307 ---- | |
30 | # Use Vim to generate the tags file. Can only be used when Vim has been | |
31 | # compiled and installed. Supports multiple languages. | |
32 | vimtags: $(DOCS) | |
33 | ! $(VIMEXE) -u NONE -esX -c "helptags ++t ." -c quit | |
34 | ||
35 | # Use "doctags" to generate the tags file. Only works for English! | |
36 | tags: doctags $(DOCS) | |
37 | *** ../vim-7.1.216/runtime/doc/various.txt Sat May 12 17:05:26 2007 | |
38 | --- runtime/doc/various.txt Fri Jan 11 20:45:45 2008 | |
39 | *************** | |
40 | *** 1,4 **** | |
41 | ! *various.txt* For Vim version 7.1. Last change: 2007 Jan 14 | |
42 | ||
43 | ||
44 | VIM REFERENCE MANUAL by Bram Moolenaar | |
45 | --- 1,4 ---- | |
46 | ! *various.txt* For Vim version 7.1. Last change: 2008 Jan 11 | |
47 | ||
48 | ||
49 | VIM REFERENCE MANUAL by Bram Moolenaar | |
50 | *************** | |
51 | *** 748,754 **** | |
52 | ||
53 | *:helpt* *:helptags* | |
54 | *E154* *E150* *E151* *E152* *E153* *E670* | |
55 | ! :helpt[ags] {dir} Generate the help tags file(s) for directory {dir}. | |
56 | All "*.txt" and "*.??x" files in the directory are | |
57 | scanned for a help tag definition in between stars. | |
58 | The "*.??x" files are for translated docs, they | |
59 | --- 754,761 ---- | |
60 | ||
61 | *:helpt* *:helptags* | |
62 | *E154* *E150* *E151* *E152* *E153* *E670* | |
63 | ! :helpt[ags] [++t] {dir} | |
64 | ! Generate the help tags file(s) for directory {dir}. | |
65 | All "*.txt" and "*.??x" files in the directory are | |
66 | scanned for a help tag definition in between stars. | |
67 | The "*.??x" files are for translated docs, they | |
68 | *************** | |
69 | *** 756,761 **** | |
70 | --- 763,771 ---- | |
71 | The generated tags files are sorted. | |
72 | When there are duplicates an error message is given. | |
73 | An existing tags file is silently overwritten. | |
74 | + The optional "++t" argument forces adding the | |
75 | + "help-tags" tag. This is also done when the {dir} is | |
76 | + equal to $VIMRUNTIME/doc. | |
77 | To rebuild the help tags in the runtime directory | |
78 | (requires write permission there): > | |
79 | :helptags $VIMRUNTIME/doc | |
80 | *** ../vim-7.1.216/src/ex_cmds.c Wed Jan 9 22:39:55 2008 | |
81 | --- src/ex_cmds.c Fri Jan 11 20:47:13 2008 | |
82 | *************** | |
83 | *** 6091,6097 **** | |
84 | } | |
85 | ||
86 | #if defined(FEAT_EX_EXTRA) || defined(PROTO) | |
87 | ! static void helptags_one __ARGS((char_u *dir, char_u *ext, char_u *lang)); | |
88 | ||
89 | /* | |
90 | * ":helptags" | |
91 | --- 6091,6097 ---- | |
92 | } | |
93 | ||
94 | #if defined(FEAT_EX_EXTRA) || defined(PROTO) | |
95 | ! static void helptags_one __ARGS((char_u *dir, char_u *ext, char_u *lang, int add_help_tags)); | |
96 | ||
97 | /* | |
98 | * ":helptags" | |
99 | *************** | |
100 | *** 6110,6115 **** | |
101 | --- 6110,6123 ---- | |
102 | char_u fname[8]; | |
103 | int filecount; | |
104 | char_u **files; | |
105 | + int add_help_tags = FALSE; | |
106 | + | |
107 | + /* Check for ":helptags ++t {dir}". */ | |
108 | + if (STRNCMP(eap->arg, "++t", 3) == 0 && vim_iswhite(eap->arg[3])) | |
109 | + { | |
110 | + add_help_tags = TRUE; | |
111 | + eap->arg = skipwhite(eap->arg + 3); | |
112 | + } | |
113 | ||
114 | if (!mch_isdir(eap->arg)) | |
115 | { | |
116 | *************** | |
117 | *** 6192,6198 **** | |
118 | ext[1] = fname[5]; | |
119 | ext[2] = fname[6]; | |
120 | } | |
121 | ! helptags_one(eap->arg, ext, fname); | |
122 | } | |
123 | ||
124 | ga_clear(&ga); | |
125 | --- 6200,6206 ---- | |
126 | ext[1] = fname[5]; | |
127 | ext[2] = fname[6]; | |
128 | } | |
129 | ! helptags_one(eap->arg, ext, fname, add_help_tags); | |
130 | } | |
131 | ||
132 | ga_clear(&ga); | |
133 | *************** | |
134 | *** 6200,6214 **** | |
135 | ||
136 | #else | |
137 | /* No language support, just use "*.txt" and "tags". */ | |
138 | ! helptags_one(eap->arg, (char_u *)".txt", (char_u *)"tags"); | |
139 | #endif | |
140 | } | |
141 | ||
142 | static void | |
143 | ! helptags_one(dir, ext, tagfname) | |
144 | ! char_u *dir; /* doc directory */ | |
145 | ! char_u *ext; /* suffix, ".txt", ".itx", ".frx", etc. */ | |
146 | ! char_u *tagfname; /* "tags" for English, "tags-it" for Italian. */ | |
147 | { | |
148 | FILE *fd_tags; | |
149 | FILE *fd; | |
150 | --- 6208,6223 ---- | |
151 | ||
152 | #else | |
153 | /* No language support, just use "*.txt" and "tags". */ | |
154 | ! helptags_one(eap->arg, (char_u *)".txt", (char_u *)"tags", add_help_tags); | |
155 | #endif | |
156 | } | |
157 | ||
158 | static void | |
159 | ! helptags_one(dir, ext, tagfname, add_help_tags) | |
160 | ! char_u *dir; /* doc directory */ | |
161 | ! char_u *ext; /* suffix, ".txt", ".itx", ".frx", etc. */ | |
162 | ! char_u *tagfname; /* "tags" for English, "tags-fr" for French. */ | |
163 | ! int add_help_tags; /* add "help-tags" tag */ | |
164 | { | |
165 | FILE *fd_tags; | |
166 | FILE *fd; | |
167 | *************** | |
168 | *** 6259,6268 **** | |
169 | } | |
170 | ||
171 | /* | |
172 | ! * If generating tags for "$VIMRUNTIME/doc" add the "help-tags" tag. | |
173 | */ | |
174 | ga_init2(&ga, (int)sizeof(char_u *), 100); | |
175 | ! if (fullpathcmp((char_u *)"$VIMRUNTIME/doc", dir, FALSE) == FPC_SAME) | |
176 | { | |
177 | if (ga_grow(&ga, 1) == FAIL) | |
178 | got_int = TRUE; | |
179 | --- 6268,6279 ---- | |
180 | } | |
181 | ||
182 | /* | |
183 | ! * If using the "++t" argument or generating tags for "$VIMRUNTIME/doc" | |
184 | ! * add the "help-tags" tag. | |
185 | */ | |
186 | ga_init2(&ga, (int)sizeof(char_u *), 100); | |
187 | ! if (add_help_tags || fullpathcmp((char_u *)"$VIMRUNTIME/doc", | |
188 | ! dir, FALSE) == FPC_SAME) | |
189 | { | |
190 | if (ga_grow(&ga, 1) == FAIL) | |
191 | got_int = TRUE; | |
192 | *** ../vim-7.1.216/src/ex_cmds.h Thu Mar 8 11:00:55 2007 | |
193 | --- src/ex_cmds.h Fri Jan 11 20:49:18 2008 | |
194 | *************** | |
195 | *** 422,428 **** | |
196 | EX(CMD_helpgrep, "helpgrep", ex_helpgrep, | |
197 | EXTRA|NOTRLCOM|NEEDARG), | |
198 | EX(CMD_helptags, "helptags", ex_helptags, | |
199 | ! NEEDARG|FILE1|TRLBAR|CMDWIN), | |
200 | EX(CMD_hardcopy, "hardcopy", ex_hardcopy, | |
201 | RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG), | |
202 | EX(CMD_highlight, "highlight", ex_highlight, | |
203 | --- 422,428 ---- | |
204 | EX(CMD_helpgrep, "helpgrep", ex_helpgrep, | |
205 | EXTRA|NOTRLCOM|NEEDARG), | |
206 | EX(CMD_helptags, "helptags", ex_helptags, | |
207 | ! NEEDARG|FILES|TRLBAR|CMDWIN), | |
208 | EX(CMD_hardcopy, "hardcopy", ex_hardcopy, | |
209 | RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG), | |
210 | EX(CMD_highlight, "highlight", ex_highlight, | |
211 | *** ../vim-7.1.216/src/version.c Fri Jan 11 20:25:42 2008 | |
212 | --- src/version.c Fri Jan 11 20:58:44 2008 | |
213 | *************** | |
214 | *** 668,669 **** | |
215 | --- 668,671 ---- | |
216 | { /* Add new patch number below this line */ | |
217 | + /**/ | |
218 | + 217, | |
219 | /**/ | |
220 | ||
221 | -- | |
222 | My girlfriend told me I should be more affectionate. | |
223 | So I got TWO girlfriends. | |
224 | ||
225 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
226 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
227 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
228 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |