开发者

Emacs symbol-at-point with C++ scope

开发者 https://www.devze.com 2023-04-07 00:54 出处:网络
Has anyone extended symbol-at-point to include, in my use case the C++开发者_如何学C namespace, scope as well?

Has anyone extended symbol-at-point to include, in my use case the C++开发者_如何学C namespace, scope as well?

Having the cursor on std::vector should preferably return ("std" "vector").


The CEDET toolset includes a set of local context parsers that will do what you want, but it doesn't extend symbol-at-point. Instead it has its own context parser. If you have a version of Emacs with CEDET pre-installed, just enabled semantic-mode, and then use the command semantic-analyze-current-context. It will return a class with the prefix. If you just want the raw prefix for a program, then you can instead use semantic-ctxt-current-symbol to return whatever is under point.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号