all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Bas Kok" <bakotaco@gmail.com>
To: emacs-devel@gnu.org
Subject: [Patch] etags support for php5
Date: Sun, 23 Sep 2007 11:48:45 +0300	[thread overview]
Message-ID: <88872ed0709230148qa42e29crebdbb9e038085246@mail.gmail.com> (raw)
In-Reply-To: <88872ed0709220828n777b6802vbfe12a6ce52c599d@mail.gmail.com>

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

  reply	other threads:[~2007-09-23  8:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-22 15:28 [Patch] etags support for php5 Bas Kok
2007-09-23  8:48 ` Bas Kok [this message]
2007-09-23 15:05   ` Richard Stallman
2007-09-24 10:40     ` Bas Kok

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

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

  git send-email \
    --in-reply-to=88872ed0709230148qa42e29crebdbb9e038085246@mail.gmail.com \
    --to=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 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.