Mirror of the Vim source from https://github.com/vim/vim
Revision | 717e759932cb94af9ee8dc9e93f33b67f292e8c1 (tree) |
---|---|
Time | 2008-01-12 05:02:02 |
Author | vimboss |
Commiter | vimboss |
updated for version 7.1-217
@@ -301,7 +301,7 @@ | ||
301 | 301 | # Use Vim to generate the tags file. Can only be used when Vim has been |
302 | 302 | # compiled and installed. Supports multiple languages. |
303 | 303 | vimtags: $(DOCS) |
304 | - $(VIMEXE) -u NONE -esX -c "helptags ." -c quit | |
304 | + $(VIMEXE) -u NONE -esX -c "helptags ++t ." -c quit | |
305 | 305 | |
306 | 306 | # Use "doctags" to generate the tags file. Only works for English! |
307 | 307 | tags: doctags $(DOCS) |
@@ -1,4 +1,4 @@ | ||
1 | -*various.txt* For Vim version 7.1. Last change: 2007 Jan 14 | |
1 | +*various.txt* For Vim version 7.1. Last change: 2008 Jan 11 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -748,7 +748,8 @@ | ||
748 | 748 | |
749 | 749 | *:helpt* *:helptags* |
750 | 750 | *E154* *E150* *E151* *E152* *E153* *E670* |
751 | -:helpt[ags] {dir} Generate the help tags file(s) for directory {dir}. | |
751 | +:helpt[ags] [++t] {dir} | |
752 | + Generate the help tags file(s) for directory {dir}. | |
752 | 753 | All "*.txt" and "*.??x" files in the directory are |
753 | 754 | scanned for a help tag definition in between stars. |
754 | 755 | The "*.??x" files are for translated docs, they |
@@ -756,6 +757,9 @@ | ||
756 | 757 | The generated tags files are sorted. |
757 | 758 | When there are duplicates an error message is given. |
758 | 759 | An existing tags file is silently overwritten. |
760 | + The optional "++t" argument forces adding the | |
761 | + "help-tags" tag. This is also done when the {dir} is | |
762 | + equal to $VIMRUNTIME/doc. | |
759 | 763 | To rebuild the help tags in the runtime directory |
760 | 764 | (requires write permission there): > |
761 | 765 | :helptags $VIMRUNTIME/doc |
@@ -6091,7 +6091,7 @@ | ||
6091 | 6091 | } |
6092 | 6092 | |
6093 | 6093 | #if defined(FEAT_EX_EXTRA) || defined(PROTO) |
6094 | -static void helptags_one __ARGS((char_u *dir, char_u *ext, char_u *lang)); | |
6094 | +static void helptags_one __ARGS((char_u *dir, char_u *ext, char_u *lang, int add_help_tags)); | |
6095 | 6095 | |
6096 | 6096 | /* |
6097 | 6097 | * ":helptags" |
@@ -6110,6 +6110,14 @@ | ||
6110 | 6110 | char_u fname[8]; |
6111 | 6111 | int filecount; |
6112 | 6112 | char_u **files; |
6113 | + int add_help_tags = FALSE; | |
6114 | + | |
6115 | + /* Check for ":helptags ++t {dir}". */ | |
6116 | + if (STRNCMP(eap->arg, "++t", 3) == 0 && vim_iswhite(eap->arg[3])) | |
6117 | + { | |
6118 | + add_help_tags = TRUE; | |
6119 | + eap->arg = skipwhite(eap->arg + 3); | |
6120 | + } | |
6113 | 6121 | |
6114 | 6122 | if (!mch_isdir(eap->arg)) |
6115 | 6123 | { |
@@ -6192,7 +6200,7 @@ | ||
6192 | 6200 | ext[1] = fname[5]; |
6193 | 6201 | ext[2] = fname[6]; |
6194 | 6202 | } |
6195 | - helptags_one(eap->arg, ext, fname); | |
6203 | + helptags_one(eap->arg, ext, fname, add_help_tags); | |
6196 | 6204 | } |
6197 | 6205 | |
6198 | 6206 | ga_clear(&ga); |
@@ -6200,15 +6208,16 @@ | ||
6200 | 6208 | |
6201 | 6209 | #else |
6202 | 6210 | /* No language support, just use "*.txt" and "tags". */ |
6203 | - helptags_one(eap->arg, (char_u *)".txt", (char_u *)"tags"); | |
6211 | + helptags_one(eap->arg, (char_u *)".txt", (char_u *)"tags", add_help_tags); | |
6204 | 6212 | #endif |
6205 | 6213 | } |
6206 | 6214 | |
6207 | 6215 | static void |
6208 | -helptags_one(dir, ext, tagfname) | |
6209 | - char_u *dir; /* doc directory */ | |
6210 | - char_u *ext; /* suffix, ".txt", ".itx", ".frx", etc. */ | |
6211 | - char_u *tagfname; /* "tags" for English, "tags-it" for Italian. */ | |
6216 | +helptags_one(dir, ext, tagfname, add_help_tags) | |
6217 | + char_u *dir; /* doc directory */ | |
6218 | + char_u *ext; /* suffix, ".txt", ".itx", ".frx", etc. */ | |
6219 | + char_u *tagfname; /* "tags" for English, "tags-fr" for French. */ | |
6220 | + int add_help_tags; /* add "help-tags" tag */ | |
6212 | 6221 | { |
6213 | 6222 | FILE *fd_tags; |
6214 | 6223 | FILE *fd; |
@@ -6259,10 +6268,12 @@ | ||
6259 | 6268 | } |
6260 | 6269 | |
6261 | 6270 | /* |
6262 | - * If generating tags for "$VIMRUNTIME/doc" add the "help-tags" tag. | |
6271 | + * If using the "++t" argument or generating tags for "$VIMRUNTIME/doc" | |
6272 | + * add the "help-tags" tag. | |
6263 | 6273 | */ |
6264 | 6274 | ga_init2(&ga, (int)sizeof(char_u *), 100); |
6265 | - if (fullpathcmp((char_u *)"$VIMRUNTIME/doc", dir, FALSE) == FPC_SAME) | |
6275 | + if (add_help_tags || fullpathcmp((char_u *)"$VIMRUNTIME/doc", | |
6276 | + dir, FALSE) == FPC_SAME) | |
6266 | 6277 | { |
6267 | 6278 | if (ga_grow(&ga, 1) == FAIL) |
6268 | 6279 | got_int = TRUE; |
@@ -422,7 +422,7 @@ | ||
422 | 422 | EX(CMD_helpgrep, "helpgrep", ex_helpgrep, |
423 | 423 | EXTRA|NOTRLCOM|NEEDARG), |
424 | 424 | EX(CMD_helptags, "helptags", ex_helptags, |
425 | - NEEDARG|FILE1|TRLBAR|CMDWIN), | |
425 | + NEEDARG|FILES|TRLBAR|CMDWIN), | |
426 | 426 | EX(CMD_hardcopy, "hardcopy", ex_hardcopy, |
427 | 427 | RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG), |
428 | 428 | EX(CMD_highlight, "highlight", ex_highlight, |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 217, | |
671 | +/**/ | |
670 | 672 | 216, |
671 | 673 | /**/ |
672 | 674 | 215, |