emacs:是否有语义跳转到声明(使用semantic.el)? [英] emacs: is there a semantic-jump-to-declaration (using semantic.el)?

查看:230
本文介绍了emacs:是否有语义跳转到声明(使用semantic.el)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我正在编辑一个包含C代码的缓冲区。



我已经开始语义 semantic-load-enable-code-helpers



我把点放在一个函数的名字上。如果我然后调用 senator-jump ,我可以跳转到该模块中首次声明fn的地方。如果该模块中有一个extern声明,那么它将转到该extern语句。有时?有时它不起作用。



还有语义ia-fast-jump ,也跳转到第一个声明。我不知道这个fn与 senator-jump 的区别。但是,对于本地缓冲区中定义的函数,这个实际上一直工作。



如果我想跳转到的功能是什么,是一个extern?是否可以使用参议员跳转到fn的定义,如果该定义位于单独的模块中? EDE是不是应该做这样的事情?



谢谢。

解决方案

查看语义ia-fast -jump函数,在语义ia中定义。对于C& C ++也是从GNU Global生成gtag数据库的好主意 - CEDET支持它。



P.S。我刚刚检查 - 它从我的源跳转到/ usr / include /....


中的std :: string声明

Suppose I am editing a buffer containing C code.

I have started semantic with semantic-load-enable-code-helpers .

I have point placed on the name of a function . If I then invoke senator-jump I can jump to the place where that fn is first declared, in that module. If there is an extern declaration in that module, then it goes to that extern statement. Sometimes? Sometimes it doesn't work, though.

There is also semantic-ia-fast-jump, which jumps to the first declaration, also. I'm not sure how this fn differs from senator-jump. This one actually works all the time, though, for functions defined in the local buffer.

What if it the function I want to jump to, is an extern? Is it possible to use senator to jump to the definition of the fn, if that definition resides in a separate module? Isn't EDE supposed to do something like this?

Thanks.

解决方案

Look to the semantic-ia-fast-jump function, defined in semantic-ia. For C & C++ it's also good idea to generate database with gtags from GNU Global - CEDET has support for it.

P.S. I just checked - it jumped from my source to declaration of std::string in /usr/include/....

这篇关于emacs:是否有语义跳转到声明(使用semantic.el)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆