Cmake syntax highlighting for aquamacs

Aquamacs does not offer syntax highlighting for cmake files for default. To change that, download the parser from cmake website: http://www.cmake.org/CMakeDocs/cmake-mode.el

Then, add the following lines in the configuration file for aquamacs, usually in: ~/Library/Preferences/Aquamacs Emacs/Preferences.el

; Add cmake listfile names to the mode list.
(setq auto-mode-alist
	  (append
	   '(("CMakeLists\\.txt\\'" . cmake-mode))
	   '(("\\.cmake\\'" . cmake-mode))
	   auto-mode-alist))

(autoload 'cmake-mode "~/CMake/Docs/cmake-mode.el" t)

Source:

http://www.itk.org/Wiki/CMake_Editors_Support

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s