如何设置Cscope->数据库->数据库 设置初始化目录
我正在使用 xcode 和 emacs。 但每次启动 emacs 时,我都需要 转到菜单“CScope”-> Cscope->数据库-> 设置初始化目录 它选择我的源的根目录。
然后我单击“CScope”-> Cscope->数据库-> set init Directory->创建列表和索引'
无论如何,我可以在 .emacs 中配置它,这样我就不需要每次启动 emacs 时都这样做吗?
谢谢。
I am using xcode with emacs. But everytime I start emacs, I need to
go to menu 'CScope' -> Cscope->database -> set init Directory
and it pick the root directory of my source.
And then I click 'CScope' -> Cscope->database -> set init Directory->create list and index'
Is there anyway I can configure that in .emacs so that I don't need to do that every time i start emacs?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用此 cscope 模式看起来您可以执行
Mx custom-variable RET cscope-last-directory RET
,将变量设置为您最喜欢的目录,然后保存该值。 如果没有,您必须更具体地了解如何将 cscope 与 Emacs 一起使用。If you're using this cscope mode it looks like you could do
M-x customize-variable RET cscope-last-directory RET
, set the variable to your favorite directory, and save the value. If not, you'll have to be more specific about how you are using cscope with Emacs.参考《在大型项目中使用Cscope(例如:Linux内核)》
使用find命令构建cscope.files
find /path/to/project -name ".h" -or -name ".c" > /path/to/cscope/initdir
编辑 .emacs
(setq cscope-initial-directory "/path/to/cscope/initdir")
PS: 我使用xcscope.el
refer to "Using Cscope on large projects(example: the Linux kernel)"
use find command build cscope.files
find /path/to/project -name ".h" -or -name ".c" > /path/to/cscope/initdir
edit .emacs
(setq cscope-initial-directory "/path/to/cscope/initdir")
PS: I use xcscope.el