[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs for browsing c code
From: |
Daniel (Youngwhan) |
Subject: |
Re: Emacs for browsing c code |
Date: |
Tue, 04 May 2010 15:45:17 -0000 |
User-agent: |
G2/1.0 |
On Apr 18, 3:18 am, Volkan YAZICI <volkan.yaz...@gmail.com> wrote:
> On Apr 18, 4:59 am, "Daniel (Youngwhan)" <breadn...@gmail.com> wrote:
>
> > I really like Emacs to edit and browse a c/c++ code with cscope so
> > far. I have used CEDET and ECB, but they were too complicated and not
> > for me at this time. So, I decided to use cscope only.
>
> > However, one of what I miss features is browsing function names in a
> > certain window. Source Insight / Eclipse or other tools supports that
> > when a function name is clicked in a certain window, it jumps to the
> > position.
>
> I am addicted to cscope as well. I don't know if it is what you're
> looking for, but below are my xcscope.el configurations.
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;;;
> ;;; C Mode
> ;;;
>
> (defun my-c-mode ()
> (interactive)
> (hide-ifdef-mode)
> (c-set-style "bsd")
> (setq
> indent-tabs-mode t
> tab-width 4
> c-basic-offset 4
> c-backslash-max-column fill-column
> c-backslash-column c-backslash-max-column)
> ;; Cscope Bindings
> (define-key c-mode-map (kbd "C-c . i") 'cscope-find-files-including-
> file)
> (define-key c-mode-map (kbd "C-c . f") 'cscope-find-called-
> functions)
> (define-key c-mode-map (kbd "C-c . c f") 'cscope-find-functions-
> calling-this-function)
> (define-key c-mode-map (kbd "C-c . g") 'cscope-find-global-
> definition)
> (define-key c-mode-map (kbd "C-c . s") 'cscope-find-this-symbol)
> (define-key c-mode-map (kbd "C-c . t") 'cscope-find-this-text-
> string)
> (define-key c-mode-map (kbd "C-c . x") 'cscope-index-files))
>
> (add-hook 'c-mode-hook 'my-c-mode)
>
> ;;; xcscope.el
>
> (load "~/elisp/xcscope.el")
> (require 'xcscope)
>
> It doesn't provide a separate window for stuff, but I'm happy with "C-
> x 0", "C-x 1", "C-x 2", "C-x 3", and "C-x b" so far. I hope it works
> for you as well.
>
> Regards.
Thanks Guys,
Speedbar is sort of working for me at this time. :)
Thank you!
Daniel