Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 276902

Summary: patch ctags-5.7 for better PHP5 support
Product: Gentoo Linux Reporter: David Mudrák <gentoo>
Component: [OLD] DevelopmentAssignee: Vim Maintainers <vim>
Status: RESOLVED OBSOLETE    
Severity: normal CC: danila.bespalov, sam
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://www.jejik.com/articles/2008/11/patching_exuberant-ctags_for_better_php5_support_in_vim/
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: The patch fixes the problem with PHP keywords in multilines comments
Implements the useful behaviour that only class member variables are tagged
Small modification

Description David Mudrák 2009-07-07 09:57:53 UTC
The problem is described at the URL provided. The solution is there as well.

Reproducible: Always
Comment 1 David Mudrák 2009-07-07 10:00:11 UTC
Created attachment 197030 [details, diff]
The patch fixes the problem with PHP keywords in multilines comments

Add epatch "${FILESDIR}/${PN}-5.7-php-keywords-in-comments.patch" to src_unpack()
Comment 2 David Mudrák 2009-07-07 10:01:22 UTC
Created attachment 197032 [details, diff]
Implements the useful behaviour that only class member variables are tagged

Add epatch "${FILESDIR}/${PN}-5.7-php-class-member-variables-only.patch" to src_unpack()
Comment 3 David Mudrák 2009-07-07 14:20:32 UTC
Created attachment 197070 [details, diff]
Small modification

I think the Sander's patches have problems with backward compatibility. They do not seem to tag functions starting on a new line without the visibility scope declaration, like

function ordinary_function()

because of the [ \t]+

I prepared my own version of patches that should fix this while still implementing the described behaviour. Also, I have merged both patches into a single one as I suppose no-one really wants to have _every_ variable assignment tagged. Just member variables are interesting.
Comment 4 David Mudrák 2009-07-08 14:32:28 UTC
Comment on attachment 197070 [details, diff]
Small modification

Actually, I have found

+	addTagRegex(language, "(^[ \t]*)(var[ \t]+|public[ \t]+|protected[ \t]+|private[ \t]+)+(static[ \t]+)?\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*=",
+		"\\4", "v,variable,variables", NULL);

more useful because it only tags class member variables. this fits very nicely into taglist extension.
Comment 5 Wormo (RETIRED) gentoo-dev 2009-07-11 21:18:37 UTC
Thanks for submitting your patch! Assigning to ctags maintainers.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-03-26 14:14:18 UTC
I think this is obsolete now?
Comment 7 David Mudrák 2021-03-26 16:25:46 UTC
I think so :-s