Next: , Previous: , Up: How to set up Emacs for file parsing with ECB   [Contents][Index]


1.2.1 General hints for a correct setup

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:

LanguageMajor-modeExtension(s)
Emacs Lispemacs-lisp-mode.el
Cc-mode.h, .c
C++c++-mode.h, .hxx, .hh, .HH, .cxx, .cpp, .cc, .CC
Javajava-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.


Footnotes

(4)

semantic supports some more “languages” like Phython, Makefiles and some more. But these are the most important ones.

(5)

Especially for C++ and C you can use any extension you want but these are the most common ones!