unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Emacs Devel <emacs-devel@gnu.org>, Bas Kok <bakotaco@gmail.com>
Subject: [Fwd: [Patch] etags support for php5]
Date: Fri, 30 May 2008 18:51:09 +0200	[thread overview]
Message-ID: <4840307D.4050903@gmail.com> (raw)

[-- 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;

             reply	other threads:[~2008-05-30 16:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 16:51 Lennart Borgman (gmail) [this message]
2009-10-12 16:40 ` [Fwd: [Patch] etags support for php5] Jordi Gutiérrez Hermoso
2009-10-12 19:47   ` Francesco Potortì

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4840307D.4050903@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=bakotaco@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).