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.
我正在使用带有emacs的xcode。但每次我启动emacs时,我都需要进入菜单'CScope' - > Cscope-> database - > set init Directory,然后选择我的源的根目录。
And then I click 'CScope' -> Cscope->database -> set init Directory->create list and index'
然后我点击'CScope' - > Cscope->数据库 - >设置init目录 - >创建列表和索引'
Is there anyway I can configure that in .emacs so that I don't need to do that every time i start emacs?
无论如何我可以在.emacs中配置它,这样我每次启动emacs时都不需要这样做吗?
Thank you.
2 个解决方案
#1
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模式,看起来您可以执行M-x自定义变量RET cscope-last-directory RET,将变量设置为您喜欢的目录,并保存该值。如果没有,您必须更具体地说明如何将cscope与Emacs一起使用。
#2
refer to "Using Cscope on large projects(example: the Linux kernel)"
请参阅“在大型项目上使用Cscope(例如:Linux内核)”
-
use find command build cscope.files
使用find命令构建cscope.files
find /path/to/project -name ".h" -or -name ".c" > /path/to/cscope/initdir
find / path / to / project -name“.h”-or -name“.c”> / path / to / cscope / initdir
-
edit .emacs
(setq cscope-initial-directory "/path/to/cscope/initdir")
(setq cscope-initial-directory“/ path / to / cscope / initdir”)
PS: I use xcscope.el
PS:我使用的是xcscope.el
#1
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模式,看起来您可以执行M-x自定义变量RET cscope-last-directory RET,将变量设置为您喜欢的目录,并保存该值。如果没有,您必须更具体地说明如何将cscope与Emacs一起使用。
#2
refer to "Using Cscope on large projects(example: the Linux kernel)"
请参阅“在大型项目上使用Cscope(例如:Linux内核)”
-
use find command build cscope.files
使用find命令构建cscope.files
find /path/to/project -name ".h" -or -name ".c" > /path/to/cscope/initdir
find / path / to / project -name“.h”-or -name“.c”> / path / to / cscope / initdir
-
edit .emacs
(setq cscope-initial-directory "/path/to/cscope/initdir")
(setq cscope-initial-directory“/ path / to / cscope / initdir”)
PS: I use xcscope.el
PS:我使用的是xcscope.el