all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Patch] etags support for php5
@ 2007-09-22 15:28 Bas Kok
  2007-09-23  8:48 ` Bas Kok
  0 siblings, 1 reply; 4+ messages in thread
From: Bas Kok @ 2007-09-22 15:28 UTC (permalink / raw)
  To: bug-gnu-emacs

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

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] 4+ messages in thread

* [Patch] etags support for php5
  2007-09-22 15:28 [Patch] etags support for php5 Bas Kok
@ 2007-09-23  8:48 ` Bas Kok
  2007-09-23 15:05   ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Bas Kok @ 2007-09-23  8:48 UTC (permalink / raw)
  To: emacs-devel

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

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, so I patched it a bit.

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;

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: [Patch] etags support for php5
  2007-09-23  8:48 ` Bas Kok
@ 2007-09-23 15:05   ` Richard Stallman
  2007-09-24 10:40     ` Bas Kok
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2007-09-23 15:05 UTC (permalink / raw)
  To: Bas Kok; +Cc: emacs-devel

This patch is big enough that we need legal papers.
Would you like to sign a copyright for Emacs changes?

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

* Re: [Patch] etags support for php5
  2007-09-23 15:05   ` Richard Stallman
@ 2007-09-24 10:40     ` Bas Kok
  0 siblings, 0 replies; 4+ messages in thread
From: Bas Kok @ 2007-09-24 10:40 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

On 9/23/07, Richard Stallman <rms@gnu.org> wrote:
> This patch is big enough that we need legal papers.
> Would you like to sign a copyright for Emacs changes?

Of course. Where and how can I sign the copyright?

Thanks,
-- 
Bas

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

end of thread, other threads:[~2007-09-24 10:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-22 15:28 [Patch] etags support for php5 Bas Kok
2007-09-23  8:48 ` Bas Kok
2007-09-23 15:05   ` Richard Stallman
2007-09-24 10:40     ` Bas Kok

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.