744b1b2
To: vim-dev@vim.org
744b1b2
Subject: Patch 7.2.068
744b1b2
Fcc: outbox
744b1b2
From: Bram Moolenaar <Bram@moolenaar.net>
744b1b2
Mime-Version: 1.0
744b1b2
Content-Type: text/plain; charset=ISO-8859-1
744b1b2
Content-Transfer-Encoding: 8bit
744b1b2
------------
744b1b2
744b1b2
Patch 7.2.068
744b1b2
Problem:    Emacs tags file lines can be too long, resulting in an error
744b1b2
	    message. (James Vega)
744b1b2
Solution:   Ignore lines with errors if they are too long.
744b1b2
Files:	    src/tag.c
744b1b2
744b1b2
744b1b2
*** ../vim-7.2.067/src/tag.c	Fri Jul 18 11:26:12 2008
744b1b2
--- src/tag.c	Sat Dec  6 13:54:33 2008
744b1b2
***************
744b1b2
*** 2725,2731 ****
744b1b2
--- 2725,2748 ----
744b1b2
  	 */
744b1b2
  	p_7f = vim_strchr(lbuf, 0x7f);
744b1b2
  	if (p_7f == NULL)
744b1b2
+ 	{
744b1b2
+ etag_fail:
744b1b2
+ 	    if (vim_strchr(lbuf, '\n') == NULL)
744b1b2
+ 	    {
744b1b2
+ 		/* Truncated line.  Ignore it. */
744b1b2
+ 		if (p_verbose >= 5)
744b1b2
+ 		{
744b1b2
+ 		    verbose_enter();
744b1b2
+ 		    MSG(_("Ignoring long line in tags file"));
744b1b2
+ 		    verbose_leave();
744b1b2
+ 		}
744b1b2
+ 		tagp->command = lbuf;
744b1b2
+ 		tagp->tagname = lbuf;
744b1b2
+ 		tagp->tagname_end = lbuf;
744b1b2
+ 		return OK;
744b1b2
+ 	    }
744b1b2
  	    return FAIL;
744b1b2
+ 	}
744b1b2
  
744b1b2
  	/* Find ^A.  If not found the line number is after the 0x7f */
744b1b2
  	p = vim_strchr(p_7f, Ctrl_A);
744b1b2
***************
744b1b2
*** 2735,2741 ****
744b1b2
  	    ++p;
744b1b2
  
744b1b2
  	if (!VIM_ISDIGIT(*p))	    /* check for start of line number */
744b1b2
! 	    return FAIL;
744b1b2
  	tagp->command = p;
744b1b2
  
744b1b2
  
744b1b2
--- 2752,2758 ----
744b1b2
  	    ++p;
744b1b2
  
744b1b2
  	if (!VIM_ISDIGIT(*p))	    /* check for start of line number */
744b1b2
! 	    goto etag_fail;
744b1b2
  	tagp->command = p;
744b1b2
  
744b1b2
  
744b1b2
***************
744b1b2
*** 2749,2755 ****
744b1b2
  	    /* find end of tagname */
744b1b2
  	    for (p = p_7f - 1; !vim_iswordc(*p); --p)
744b1b2
  		if (p == lbuf)
744b1b2
! 		    return FAIL;
744b1b2
  	    tagp->tagname_end = p + 1;
744b1b2
  	    while (p >= lbuf && vim_iswordc(*p))
744b1b2
  		--p;
744b1b2
--- 2766,2772 ----
744b1b2
  	    /* find end of tagname */
744b1b2
  	    for (p = p_7f - 1; !vim_iswordc(*p); --p)
744b1b2
  		if (p == lbuf)
744b1b2
! 		    goto etag_fail;
744b1b2
  	    tagp->tagname_end = p + 1;
744b1b2
  	    while (p >= lbuf && vim_iswordc(*p))
744b1b2
  		--p;
744b1b2
*** ../vim-7.2.067/src/version.c	Tue Dec  9 11:17:23 2008
744b1b2
--- src/version.c	Tue Dec  9 12:05:41 2008
744b1b2
***************
744b1b2
*** 678,679 ****
744b1b2
--- 678,681 ----
744b1b2
  {   /* Add new patch number below this line */
744b1b2
+ /**/
744b1b2
+     68,
744b1b2
  /**/
744b1b2
744b1b2
-- 
744b1b2
Q: What do you call a fish without an eye?
744b1b2
A: fsh!
744b1b2
Q: What do you call a deer with no eyes?
744b1b2
A: no eye deer.
744b1b2
Q: What do you call a deer with no eyes and no legs?
744b1b2
A: still no eye deer.
744b1b2
744b1b2
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
744b1b2
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
744b1b2
\\\        download, build and distribute -- http://www.A-A-P.org        ///
744b1b2
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///