For a long time, probably around a decade, I have been using a refactoring tool built by Slovakian researcher Marián Vittek. It was probably one of the first refactoring tools to cross the “Refactoring Rubicon“.
It is an Emacs plugin that adds refactoring, navigation, completion and crossreference functionality for the C language. There is also some Java support, and they built a commercial C++ version.
Mostly it just works. Of course it has some trouble with heavy macro usage, it’s missing a few basic refactorings, e.g. it doesn’t extract an expression to a function returning a value correctly, so you need to edit the result. I haven’t really thought much about it until I started developing on a new computer and just took a quick look for a new version. I knew the project was kind of hibernating so I hadn’t been up-to-date with events.
To my sadness the xref-tech site was no more. After some googling I found that the C-version had survived as a SourceForge-project created already in 2009 by Marián.
This post is very much a payback for the good service Xrefactory have been giving me during many years. And a strong recommendation to you to look into c-xref if you are into Emacs and C-programming.
Do you know of any similar tools for C?
UPDATE: I’ve been working on trying to resurrect the project, actually it is a challenge to understand and to evolve, but I’m making progress. Follow, or participate in, the project at github.
4 Replies to “Xrefactory to c-xref – refactoring C with Emacs”
That site is listed as inactive and is not returning any data (ERR_EMPTY_RESPONSE). AFAIK it have not been up for a couple of years. So, although I think it was Marián’s website for some time it does not seem valid now.
Ok, so it’s up now. It seems intermittent but I’m so happy to see it at least some sign of life!
A better URL is http://www.xrefactory.com/
Also I’ve been trying actively to revive the project at https://github.com/thoni56/c-xrefactory. I’d appreaciate any help or commments.