0

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.

n179911
  • 19,547
  • 46
  • 120
  • 162

2 Answers2

0

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.

Jouni K. Seppänen
  • 43,139
  • 5
  • 71
  • 100
  • I am mainly using cscope in emacs to search for definition of a function and they open the file contains that function in a new frame in emacs. – n179911 Jul 02 '09 at 16:41
  • Where did you get the Cscope mode you are using with Emacs? If it came with Emacs, which version of Emacs do you have? – Jouni K. Seppänen Jul 03 '09 at 08:38
0

refer to "Using Cscope on large projects(example: the Linux kernel)"

  1. use find command build cscope.files

    find /path/to/project -name ".h" -or -name ".c" > /path/to/cscope/initdir

  2. edit .emacs

    (setq cscope-initial-directory "/path/to/cscope/initdir")

PS: I use xcscope.el

linjx
  • 1