0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

updated for version 7.1-217

This commit is contained in:
Bram Moolenaar
2008-01-11 20:02:02 +00:00
parent 82ad324c8f
commit 426e5c9521
5 changed files with 30 additions and 13 deletions

View File

@@ -301,7 +301,7 @@ all: tags vim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED)
# Use Vim to generate the tags file. Can only be used when Vim has been # Use Vim to generate the tags file. Can only be used when Vim has been
# compiled and installed. Supports multiple languages. # compiled and installed. Supports multiple languages.
vimtags: $(DOCS) vimtags: $(DOCS)
$(VIMEXE) -u NONE -esX -c "helptags ." -c quit $(VIMEXE) -u NONE -esX -c "helptags ++t ." -c quit
# Use "doctags" to generate the tags file. Only works for English! # Use "doctags" to generate the tags file. Only works for English!
tags: doctags $(DOCS) tags: doctags $(DOCS)

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.1. Last change: 2007 Jan 14 *various.txt* For Vim version 7.1. Last change: 2008 Jan 11
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -748,7 +748,8 @@ command: >
*:helpt* *:helptags* *:helpt* *:helptags*
*E154* *E150* *E151* *E152* *E153* *E670* *E154* *E150* *E151* *E152* *E153* *E670*
:helpt[ags] {dir} Generate the help tags file(s) for directory {dir}. :helpt[ags] [++t] {dir}
Generate the help tags file(s) for directory {dir}.
All "*.txt" and "*.??x" files in the directory are All "*.txt" and "*.??x" files in the directory are
scanned for a help tag definition in between stars. scanned for a help tag definition in between stars.
The "*.??x" files are for translated docs, they The "*.??x" files are for translated docs, they
@@ -756,6 +757,9 @@ command: >
The generated tags files are sorted. The generated tags files are sorted.
When there are duplicates an error message is given. When there are duplicates an error message is given.
An existing tags file is silently overwritten. An existing tags file is silently overwritten.
The optional "++t" argument forces adding the
"help-tags" tag. This is also done when the {dir} is
equal to $VIMRUNTIME/doc.
To rebuild the help tags in the runtime directory To rebuild the help tags in the runtime directory
(requires write permission there): > (requires write permission there): >
:helptags $VIMRUNTIME/doc :helptags $VIMRUNTIME/doc

View File

@@ -6091,7 +6091,7 @@ ex_viusage(eap)
} }
#if defined(FEAT_EX_EXTRA) || defined(PROTO) #if defined(FEAT_EX_EXTRA) || defined(PROTO)
static void helptags_one __ARGS((char_u *dir, char_u *ext, char_u *lang)); static void helptags_one __ARGS((char_u *dir, char_u *ext, char_u *lang, int add_help_tags));
/* /*
* ":helptags" * ":helptags"
@@ -6110,6 +6110,14 @@ ex_helptags(eap)
char_u fname[8]; char_u fname[8];
int filecount; int filecount;
char_u **files; char_u **files;
int add_help_tags = FALSE;
/* Check for ":helptags ++t {dir}". */
if (STRNCMP(eap->arg, "++t", 3) == 0 && vim_iswhite(eap->arg[3]))
{
add_help_tags = TRUE;
eap->arg = skipwhite(eap->arg + 3);
}
if (!mch_isdir(eap->arg)) if (!mch_isdir(eap->arg))
{ {
@@ -6192,7 +6200,7 @@ ex_helptags(eap)
ext[1] = fname[5]; ext[1] = fname[5];
ext[2] = fname[6]; ext[2] = fname[6];
} }
helptags_one(eap->arg, ext, fname); helptags_one(eap->arg, ext, fname, add_help_tags);
} }
ga_clear(&ga); ga_clear(&ga);
@@ -6200,15 +6208,16 @@ ex_helptags(eap)
#else #else
/* No language support, just use "*.txt" and "tags". */ /* No language support, just use "*.txt" and "tags". */
helptags_one(eap->arg, (char_u *)".txt", (char_u *)"tags"); helptags_one(eap->arg, (char_u *)".txt", (char_u *)"tags", add_help_tags);
#endif #endif
} }
static void static void
helptags_one(dir, ext, tagfname) helptags_one(dir, ext, tagfname, add_help_tags)
char_u *dir; /* doc directory */ char_u *dir; /* doc directory */
char_u *ext; /* suffix, ".txt", ".itx", ".frx", etc. */ char_u *ext; /* suffix, ".txt", ".itx", ".frx", etc. */
char_u *tagfname; /* "tags" for English, "tags-it" for Italian. */ char_u *tagfname; /* "tags" for English, "tags-fr" for French. */
int add_help_tags; /* add "help-tags" tag */
{ {
FILE *fd_tags; FILE *fd_tags;
FILE *fd; FILE *fd;
@@ -6259,10 +6268,12 @@ helptags_one(dir, ext, tagfname)
} }
/* /*
* If generating tags for "$VIMRUNTIME/doc" add the "help-tags" tag. * If using the "++t" argument or generating tags for "$VIMRUNTIME/doc"
* add the "help-tags" tag.
*/ */
ga_init2(&ga, (int)sizeof(char_u *), 100); ga_init2(&ga, (int)sizeof(char_u *), 100);
if (fullpathcmp((char_u *)"$VIMRUNTIME/doc", dir, FALSE) == FPC_SAME) if (add_help_tags || fullpathcmp((char_u *)"$VIMRUNTIME/doc",
dir, FALSE) == FPC_SAME)
{ {
if (ga_grow(&ga, 1) == FAIL) if (ga_grow(&ga, 1) == FAIL)
got_int = TRUE; got_int = TRUE;

View File

@@ -422,7 +422,7 @@ EX(CMD_helpfind, "helpfind", ex_helpfind,
EX(CMD_helpgrep, "helpgrep", ex_helpgrep, EX(CMD_helpgrep, "helpgrep", ex_helpgrep,
EXTRA|NOTRLCOM|NEEDARG), EXTRA|NOTRLCOM|NEEDARG),
EX(CMD_helptags, "helptags", ex_helptags, EX(CMD_helptags, "helptags", ex_helptags,
NEEDARG|FILE1|TRLBAR|CMDWIN), NEEDARG|FILES|TRLBAR|CMDWIN),
EX(CMD_hardcopy, "hardcopy", ex_hardcopy, EX(CMD_hardcopy, "hardcopy", ex_hardcopy,
RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG), RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG),
EX(CMD_highlight, "highlight", ex_highlight, EX(CMD_highlight, "highlight", ex_highlight,

View File

@@ -666,6 +666,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
217,
/**/ /**/
216, 216,
/**/ /**/