Next: Setting up CEDET/semantic, Previous: How to set up Emacs for file parsing with ECB, Up: How to set up Emacs for file parsing with ECB [Contents][Index]
ECB is for browsing files and therefore you have to setup your
Emacs-configuration properly so the file-parsing engines like semantic, imenu
or etags can be activated automatically for parsing your Emacs-Lisp, C, C++ or
Java buffers4. For this
Emacs must activate the correct major-mode
for the source-files and
Emacs can only do this if the option auto-mode-alist
is setup
correctly. The correct major-modes and possible
file-extensions5 are:
Language | Major-mode | Extension(s) |
Emacs Lisp | emacs-lisp-mode | .el |
C | c-mode | .h, .c |
C++ | c++-mode | .h, .hxx, .hh, .HH, .cxx, .cpp, .cc, .CC |
Java | java-mode or jde-mode (if you use JDEE) | .java |
Example: If you want files with extension “.cpp” being c++-parsed by
semantic and ECB, your auto-mode-alist
must contain an entry
like:
("\\.cpp\\'" . c++-mode)
After this ECB will correctly parse your “.cpp”-sources and display all the parsing information in the ECB-methods buffer.