vcpp-mode is a mode for (X)Emacs to edit Visual C++ files. vcpp-mode is based on cc-mode and offers the following extensions:
Font-locking of IDE generated Macros (AFX_, BEGIN_COM_MAP etc.)
Font-locking of FAILED, E_FAIL, SUCCEEDED and S_OK macros
Font-locking common Visual C++ types (HRESULT etc.)
Font-locking Afx* Functions
Font-locking of prefixed member-variables (m_*)
Font-locking of class names (CXxxx)
Abbreviations for common used words
Font-locking of Rational Rose generated model ID (//##ModelIdxxxxx) entries. I use an almost invisible color for that, since the model IDs are rather less interesting for programming.
vcpp-mode has been tested on Emacs 21.3 and XEmacs 21.4.13 in a windows32 environemnt.
Copy the file vcpp-mode.el somewhere into a directory which is in the search-path of (X)Emacs. A good choice for Emacs users is for example C:\Program Files\emacs-21.3\site-lisp. XEmacs users can use the directory C:\Program Files\XEmacs\site-packages\lisp.
To enable vcpp-mode automatically, you have to put something like this in your .emacs file:
(require 'vcpp-mode) (add-to-list 'auto-mode-alist '("\\.h$" . vcpp-mode)) (add-to-list 'auto-mode-alist '("\\.cpp$" . vcpp-mode))
The following faces are provided by vcpp-mode:
vcpp-keyword-face. This face is used for common used keywords like WORD, TRUE and for Afx*-Functions.
vcpp-macro-face. Used for (mostly IDE-generated) Macros like BEGIN_MESSAGE_MAP etc.
vcpp-member-face. used for font-locking member variables (m_*).
vcpp-succeeded-face. Face used to markup SUCCEEDED and S_OK macros.
vcpp-failed-face. Face to markup FAILED and E_FAIL macros.
vcpp-class-face. Face for font-locking Visual C++ classnames, i.e. classnames looking like CXxxx.
vcpp-modelid-face. Face to markup Rational Rose generated Model IDs (//##ModelId=XXX)
vcpp-mode is hosted at http://sourceforge.net
The homepage of vcpp-mode is http://vcpp-mode.sourceforge.net
The latest version of vcpp-mode can always be found on http://www.sourceforge.net/projects/vcpp-mode
The authors homepage can be found on http://homepage.sunrise.ch/mysunrise/rschaeuble/