Karsten Hopp 7c61c2
To: vim-dev@vim.org
Karsten Hopp 7c61c2
Subject: Patch 7.1.217
Karsten Hopp 7c61c2
Fcc: outbox
Karsten Hopp 7c61c2
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 7c61c2
Mime-Version: 1.0
Karsten Hopp 7c61c2
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 7c61c2
Content-Transfer-Encoding: 8bit
Karsten Hopp 7c61c2
------------
Karsten Hopp 7c61c2
Karsten Hopp 7c61c2
Patch 7.1.217
Karsten Hopp 7c61c2
Problem:    The "help-tags" tag may be missing from runtime/doc/tags when it
Karsten Hopp 7c61c2
	    was generated during "make install".
Karsten Hopp 7c61c2
Solution:   Add the "++t" argument to ":helptags" to force adding the tag.
Karsten Hopp 7c61c2
Files:	    runtime/doc/Makefile, runtime/doc/various.txt, src/ex_cmds.c,
Karsten Hopp 7c61c2
	    src/ex_cmds.h
Karsten Hopp 7c61c2
Karsten Hopp 7c61c2
Karsten Hopp 7c61c2
*** ../vim-7.1.216/runtime/doc/Makefile	Sat May  5 19:14:15 2007
Karsten Hopp 7c61c2
--- runtime/doc/Makefile	Fri Jan 11 20:55:34 2008
Karsten Hopp 7c61c2
***************
Karsten Hopp 7c61c2
*** 301,307 ****
Karsten Hopp 7c61c2
  # Use Vim to generate the tags file.  Can only be used when Vim has been
Karsten Hopp 7c61c2
  # compiled and installed.  Supports multiple languages.
Karsten Hopp 7c61c2
  vimtags: $(DOCS)
Karsten Hopp 7c61c2
! 	$(VIMEXE) -u NONE -esX -c "helptags ." -c quit
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  # Use "doctags" to generate the tags file.  Only works for English!
Karsten Hopp 7c61c2
  tags: doctags $(DOCS)
Karsten Hopp 7c61c2
--- 301,307 ----
Karsten Hopp 7c61c2
  # Use Vim to generate the tags file.  Can only be used when Vim has been
Karsten Hopp 7c61c2
  # compiled and installed.  Supports multiple languages.
Karsten Hopp 7c61c2
  vimtags: $(DOCS)
Karsten Hopp 7c61c2
! 	$(VIMEXE) -u NONE -esX -c "helptags ++t ." -c quit
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  # Use "doctags" to generate the tags file.  Only works for English!
Karsten Hopp 7c61c2
  tags: doctags $(DOCS)
Karsten Hopp 7c61c2
*** ../vim-7.1.216/runtime/doc/various.txt	Sat May 12 17:05:26 2007
Karsten Hopp 7c61c2
--- runtime/doc/various.txt	Fri Jan 11 20:45:45 2008
Karsten Hopp 7c61c2
***************
Karsten Hopp 7c61c2
*** 1,4 ****
Karsten Hopp 7c61c2
! *various.txt*   For Vim version 7.1.  Last change: 2007 Jan 14
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  		  VIM REFERENCE MANUAL    by Bram Moolenaar
Karsten Hopp 7c61c2
--- 1,4 ----
Karsten Hopp 7c61c2
! *various.txt*   For Vim version 7.1.  Last change: 2008 Jan 11
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  		  VIM REFERENCE MANUAL    by Bram Moolenaar
Karsten Hopp 7c61c2
***************
Karsten Hopp 7c61c2
*** 748,754 ****
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  					*:helpt* *:helptags*
Karsten Hopp 7c61c2
  				*E154* *E150* *E151* *E152* *E153* *E670*
Karsten Hopp 7c61c2
! :helpt[ags] {dir}	Generate the help tags file(s) for directory {dir}.
Karsten Hopp 7c61c2
  			All "*.txt" and "*.??x" files in the directory are
Karsten Hopp 7c61c2
  			scanned for a help tag definition in between stars.
Karsten Hopp 7c61c2
  			The "*.??x" files are for translated docs, they
Karsten Hopp 7c61c2
--- 754,761 ----
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  					*:helpt* *:helptags*
Karsten Hopp 7c61c2
  				*E154* *E150* *E151* *E152* *E153* *E670*
Karsten Hopp 7c61c2
! :helpt[ags] [++t] {dir}
Karsten Hopp 7c61c2
! 			Generate the help tags file(s) for directory {dir}.
Karsten Hopp 7c61c2
  			All "*.txt" and "*.??x" files in the directory are
Karsten Hopp 7c61c2
  			scanned for a help tag definition in between stars.
Karsten Hopp 7c61c2
  			The "*.??x" files are for translated docs, they
Karsten Hopp 7c61c2
***************
Karsten Hopp 7c61c2
*** 756,761 ****
Karsten Hopp 7c61c2
--- 763,771 ----
Karsten Hopp 7c61c2
  			The generated tags files are sorted.
Karsten Hopp 7c61c2
  			When there are duplicates an error message is given.
Karsten Hopp 7c61c2
  			An existing tags file is silently overwritten.
Karsten Hopp 7c61c2
+ 			The optional "++t" argument forces adding the
Karsten Hopp 7c61c2
+ 			"help-tags" tag.  This is also done when the {dir} is
Karsten Hopp 7c61c2
+ 			equal to $VIMRUNTIME/doc.
Karsten Hopp 7c61c2
  			To rebuild the help tags in the runtime directory
Karsten Hopp 7c61c2
  			(requires write permission there): >
Karsten Hopp 7c61c2
  				:helptags $VIMRUNTIME/doc
Karsten Hopp 7c61c2
*** ../vim-7.1.216/src/ex_cmds.c	Wed Jan  9 22:39:55 2008
Karsten Hopp 7c61c2
--- src/ex_cmds.c	Fri Jan 11 20:47:13 2008
Karsten Hopp 7c61c2
***************
Karsten Hopp 7c61c2
*** 6091,6097 ****
Karsten Hopp 7c61c2
  }
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  #if defined(FEAT_EX_EXTRA) || defined(PROTO)
Karsten Hopp 7c61c2
! static void helptags_one __ARGS((char_u *dir, char_u *ext, char_u *lang));
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  /*
Karsten Hopp 7c61c2
   * ":helptags"
Karsten Hopp 7c61c2
--- 6091,6097 ----
Karsten Hopp 7c61c2
  }
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  #if defined(FEAT_EX_EXTRA) || defined(PROTO)
Karsten Hopp 7c61c2
! static void helptags_one __ARGS((char_u *dir, char_u *ext, char_u *lang, int add_help_tags));
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  /*
Karsten Hopp 7c61c2
   * ":helptags"
Karsten Hopp 7c61c2
***************
Karsten Hopp 7c61c2
*** 6110,6115 ****
Karsten Hopp 7c61c2
--- 6110,6123 ----
Karsten Hopp 7c61c2
      char_u	fname[8];
Karsten Hopp 7c61c2
      int		filecount;
Karsten Hopp 7c61c2
      char_u	**files;
Karsten Hopp 7c61c2
+     int		add_help_tags = FALSE;
Karsten Hopp 7c61c2
+ 
Karsten Hopp 7c61c2
+     /* Check for ":helptags ++t {dir}". */
Karsten Hopp 7c61c2
+     if (STRNCMP(eap->arg, "++t", 3) == 0 && vim_iswhite(eap->arg[3]))
Karsten Hopp 7c61c2
+     {
Karsten Hopp 7c61c2
+ 	add_help_tags = TRUE;
Karsten Hopp 7c61c2
+ 	eap->arg = skipwhite(eap->arg + 3);
Karsten Hopp 7c61c2
+     }
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
      if (!mch_isdir(eap->arg))
Karsten Hopp 7c61c2
      {
Karsten Hopp 7c61c2
***************
Karsten Hopp 7c61c2
*** 6192,6198 ****
Karsten Hopp 7c61c2
  	    ext[1] = fname[5];
Karsten Hopp 7c61c2
  	    ext[2] = fname[6];
Karsten Hopp 7c61c2
  	}
Karsten Hopp 7c61c2
! 	helptags_one(eap->arg, ext, fname);
Karsten Hopp 7c61c2
      }
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
      ga_clear(&ga);
Karsten Hopp 7c61c2
--- 6200,6206 ----
Karsten Hopp 7c61c2
  	    ext[1] = fname[5];
Karsten Hopp 7c61c2
  	    ext[2] = fname[6];
Karsten Hopp 7c61c2
  	}
Karsten Hopp 7c61c2
! 	helptags_one(eap->arg, ext, fname, add_help_tags);
Karsten Hopp 7c61c2
      }
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
      ga_clear(&ga);
Karsten Hopp 7c61c2
***************
Karsten Hopp 7c61c2
*** 6200,6214 ****
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  #else
Karsten Hopp 7c61c2
      /* No language support, just use "*.txt" and "tags". */
Karsten Hopp 7c61c2
!     helptags_one(eap->arg, (char_u *)".txt", (char_u *)"tags");
Karsten Hopp 7c61c2
  #endif
Karsten Hopp 7c61c2
  }
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
      static void
Karsten Hopp 7c61c2
! helptags_one(dir, ext, tagfname)
Karsten Hopp 7c61c2
!     char_u	*dir;	    /* doc directory */
Karsten Hopp 7c61c2
!     char_u	*ext;	    /* suffix, ".txt", ".itx", ".frx", etc. */
Karsten Hopp 7c61c2
!     char_u	*tagfname;    /* "tags" for English, "tags-it" for Italian. */
Karsten Hopp 7c61c2
  {
Karsten Hopp 7c61c2
      FILE	*fd_tags;
Karsten Hopp 7c61c2
      FILE	*fd;
Karsten Hopp 7c61c2
--- 6208,6223 ----
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
  #else
Karsten Hopp 7c61c2
      /* No language support, just use "*.txt" and "tags". */
Karsten Hopp 7c61c2
!     helptags_one(eap->arg, (char_u *)".txt", (char_u *)"tags", add_help_tags);
Karsten Hopp 7c61c2
  #endif
Karsten Hopp 7c61c2
  }
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
      static void
Karsten Hopp 7c61c2
! helptags_one(dir, ext, tagfname, add_help_tags)
Karsten Hopp 7c61c2
!     char_u	*dir;		/* doc directory */
Karsten Hopp 7c61c2
!     char_u	*ext;		/* suffix, ".txt", ".itx", ".frx", etc. */
Karsten Hopp 7c61c2
!     char_u	*tagfname;      /* "tags" for English, "tags-fr" for French. */
Karsten Hopp 7c61c2
!     int		add_help_tags;  /* add "help-tags" tag */
Karsten Hopp 7c61c2
  {
Karsten Hopp 7c61c2
      FILE	*fd_tags;
Karsten Hopp 7c61c2
      FILE	*fd;
Karsten Hopp 7c61c2
***************
Karsten Hopp 7c61c2
*** 6259,6268 ****
Karsten Hopp 7c61c2
      }
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
      /*
Karsten Hopp 7c61c2
!      * If generating tags for "$VIMRUNTIME/doc" add the "help-tags" tag.
Karsten Hopp 7c61c2
       */
Karsten Hopp 7c61c2
      ga_init2(&ga, (int)sizeof(char_u *), 100);
Karsten Hopp 7c61c2
!     if (fullpathcmp((char_u *)"$VIMRUNTIME/doc", dir, FALSE) == FPC_SAME)
Karsten Hopp 7c61c2
      {
Karsten Hopp 7c61c2
  	if (ga_grow(&ga, 1) == FAIL)
Karsten Hopp 7c61c2
  	    got_int = TRUE;
Karsten Hopp 7c61c2
--- 6268,6279 ----
Karsten Hopp 7c61c2
      }
Karsten Hopp 7c61c2
  
Karsten Hopp 7c61c2
      /*
Karsten Hopp 7c61c2
!      * If using the "++t" argument or generating tags for "$VIMRUNTIME/doc"
Karsten Hopp 7c61c2
!      * add the "help-tags" tag.
Karsten Hopp 7c61c2
       */
Karsten Hopp 7c61c2
      ga_init2(&ga, (int)sizeof(char_u *), 100);
Karsten Hopp 7c61c2
!     if (add_help_tags || fullpathcmp((char_u *)"$VIMRUNTIME/doc",
Karsten Hopp 7c61c2
! 						      dir, FALSE) == FPC_SAME)
Karsten Hopp 7c61c2
      {
Karsten Hopp 7c61c2
  	if (ga_grow(&ga, 1) == FAIL)
Karsten Hopp 7c61c2
  	    got_int = TRUE;
Karsten Hopp 7c61c2
*** ../vim-7.1.216/src/ex_cmds.h	Thu Mar  8 11:00:55 2007
Karsten Hopp 7c61c2
--- src/ex_cmds.h	Fri Jan 11 20:49:18 2008
Karsten Hopp 7c61c2
***************
Karsten Hopp 7c61c2
*** 422,428 ****
Karsten Hopp 7c61c2
  EX(CMD_helpgrep,	"helpgrep",	ex_helpgrep,
Karsten Hopp 7c61c2
  			EXTRA|NOTRLCOM|NEEDARG),
Karsten Hopp 7c61c2
  EX(CMD_helptags,	"helptags",	ex_helptags,
Karsten Hopp 7c61c2
! 			NEEDARG|FILE1|TRLBAR|CMDWIN),
Karsten Hopp 7c61c2
  EX(CMD_hardcopy,	"hardcopy",	ex_hardcopy,
Karsten Hopp 7c61c2
  			RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG),
Karsten Hopp 7c61c2
  EX(CMD_highlight,	"highlight",	ex_highlight,
Karsten Hopp 7c61c2
--- 422,428 ----
Karsten Hopp 7c61c2
  EX(CMD_helpgrep,	"helpgrep",	ex_helpgrep,
Karsten Hopp 7c61c2
  			EXTRA|NOTRLCOM|NEEDARG),
Karsten Hopp 7c61c2
  EX(CMD_helptags,	"helptags",	ex_helptags,
Karsten Hopp 7c61c2
! 			NEEDARG|FILES|TRLBAR|CMDWIN),
Karsten Hopp 7c61c2
  EX(CMD_hardcopy,	"hardcopy",	ex_hardcopy,
Karsten Hopp 7c61c2
  			RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG),
Karsten Hopp 7c61c2
  EX(CMD_highlight,	"highlight",	ex_highlight,
Karsten Hopp 7c61c2
*** ../vim-7.1.216/src/version.c	Fri Jan 11 20:25:42 2008
Karsten Hopp 7c61c2
--- src/version.c	Fri Jan 11 20:58:44 2008
Karsten Hopp 7c61c2
***************
Karsten Hopp 7c61c2
*** 668,669 ****
Karsten Hopp 7c61c2
--- 668,671 ----
Karsten Hopp 7c61c2
  {   /* Add new patch number below this line */
Karsten Hopp 7c61c2
+ /**/
Karsten Hopp 7c61c2
+     217,
Karsten Hopp 7c61c2
  /**/
Karsten Hopp 7c61c2
Karsten Hopp 7c61c2
-- 
Karsten Hopp 7c61c2
My girlfriend told me I should be more affectionate.
Karsten Hopp 7c61c2
So I got TWO girlfriends.
Karsten Hopp 7c61c2
Karsten Hopp 7c61c2
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 7c61c2
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 7c61c2
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 7c61c2
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///