all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Fwd: [Patch] etags support for php5]
@ 2008-05-30 16:51 Lennart Borgman (gmail)
  2009-10-12 16:40 ` Jordi Gutiérrez Hermoso
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2008-05-30 16:51 UTC (permalink / raw)
  To: Emacs Devel, Bas Kok

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

Was this ever added to etags?


-------- Original Message --------
Subject: [Patch] etags support for php5
Date: Sat, 22 Sep 2007 18:28:43 +0300
From: Bas Kok <bakotaco@gmail.com>
To: bug-gnu-emacs@gnu.org

Hi all,

PHP5 introduced public, private and protected access modifiers for
methods and properties, class constants and the static keyword.
However etags currently does not recognize methods and properties
qualified with these keywords, therefore I added these.

I am not sure what the process is for having this added to cvs emacs,
therefore I added the patch for this to this email.

Regards,
-- 
Bas


[-- Attachment #2: etags.patch --]
[-- Type: application/octet-stream, Size: 1570 bytes --]

*** etags.c	13 Aug 2007 15:41:27 +0200	3.77
--- etags.c	22 Sep 2007 16:11:55 +0200	
***************
*** 4669,4674 ****
--- 4669,4707 ----
  		    lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
  	  search_identifier = FALSE;
  	}
+       else if (LOOKING_AT (cp, "public") ||
+ 	       LOOKING_AT (cp, "private") ||
+ 	       LOOKING_AT (cp, "protected") ||
+ 	       LOOKING_AT (cp, "static"))
+ 	{
+ 	  cp = skip_spaces (cp);
+ 	  if (LOOKING_AT (cp, "function"))
+ 	    {
+ 	      if(*cp == '&')
+ 		cp = skip_spaces (cp+1);
+ 	      if(*cp != '\0')
+ 		{
+ 		  name = cp;
+ 		  while (!notinname (*cp))
+ 		    cp++;
+ 		  make_tag (name, cp - name, TRUE,
+ 			    lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+ 		}
+ 	      else
+ 		search_identifier = TRUE;
+ 	    }
+ 	  else if (members
+ 		   && *cp == '$')
+ 	    {
+ 	      name = cp;
+ 	      while (!notinname(*cp))
+ 		cp++;
+ 	      make_tag (name, cp - name, FALSE,
+ 			lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+ 	    }
+ 	  else
+ 	    search_identifier = TRUE;	    
+ 	}
        else if (LOOKING_AT (cp, "function"))
  	{
  	  if(*cp == '&')
***************
*** 4710,4716 ****
  		    lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
  	}
        else if (members
! 	       && LOOKING_AT (cp, "var")
  	       && *cp == '$')
  	{
  	  name = cp;
--- 4743,4750 ----
  		    lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
  	}
        else if (members
! 	       && (LOOKING_AT (cp, "var") 
! 		   || LOOKING_AT (cp, "const"))
  	       && *cp == '$')
  	{
  	  name = cp;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-12 19:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-30 16:51 [Fwd: [Patch] etags support for php5] Lennart Borgman (gmail)
2009-10-12 16:40 ` Jordi Gutiérrez Hermoso
2009-10-12 19:47   ` Francesco Potortì

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.