Node:General hints, Next:, Previous:Setting up Emacs, Up:Setting up Emacs

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 buffers1. 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-extensions2 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.


  1. semantic supports some more ``languages'' like Makefiles etc. but these are the most important ones.

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