diff lib-src/etags.c @ 90732:bc10a33dd40b

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 563-582) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 177-185) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-158
author Miles Bader <miles@gnu.org>
date Mon, 01 Jan 2007 03:21:06 +0000
parents f1d13e615070 96636bda161b
children 95d0cdf160ea
line wrap: on
line diff
--- a/lib-src/etags.c	Wed Dec 20 07:28:28 2006 +0000
+++ b/lib-src/etags.c	Mon Jan 01 03:21:06 2007 +0000
@@ -41,7 +41,7 @@
  * configuration file containing regexp definitions for etags.
  */
 
-char pot_etags_version[] = "@(#) pot revision number is $Revision: 3.61 $";
+char pot_etags_version[] = "@(#) pot revision number is 17.25";
 
 #define	TRUE	1
 #define	FALSE	0
@@ -3163,7 +3163,7 @@
 make_C_tag (isfun)
      bool isfun;
 {
-  /* This function should never be called when token.valid is FALSE, but
+  /* This function is never called when token.valid is FALSE, but
      we must protect against invalid input or internal errors. */
   if (!DEBUG && !token.valid)
     return;
@@ -3493,7 +3493,6 @@
 				  off += 1;
 				  len -= 1;
 				}
-			      len = toklen;
 			      linebuffer_setlen (&token_name, len);
 			      strncpy (token_name.buffer,
 				       newlb.buffer + off, len);
@@ -4687,8 +4686,16 @@
       while (*bp != '\0' && *bp != '=' && *bp != ':')
 	bp++;
       if (*bp == ':' || (globals && *bp == '='))
-	make_tag (lb.buffer, bp - lb.buffer, TRUE,
-		  lb.buffer, bp - lb.buffer + 1, lineno, linecharno);
+	{
+	  /* We should detect if there is more than one tag, but we do not.
+	     We just skip initial and final spaces. */
+	  char * namestart = skip_spaces (lb.buffer);
+	  while (--bp > namestart)
+	    if (!notinname (*bp))
+	      break;
+	  make_tag (namestart, bp - namestart + 1, TRUE,
+		    lb.buffer, bp - lb.buffer + 2, lineno, linecharno);
+	}
     }
 }
 
@@ -6278,7 +6285,7 @@
 		  name = lbp->buffer + start;
 		  *endp = '\0';
 		  canonicalize_filename (name); /* for DOS */
-		  taggedabsname = absolute_filename (name, curfdp->infabsdir);
+		  taggedabsname = absolute_filename (name, tagfiledir);
 		  if (filename_is_absolute (name)
 		      || filename_is_absolute (curfdp->infname))
 		    taggedfname = savestr (taggedabsname);