Given that Emacs and CakePHP are installed on Ubuntu 7.10. At first, Emacs does not high-light php code and also php template that are used in CakePHP. So I installed php-mode by this command:
aptitude install php-mode
Then I can edit php code with syntax highlighting. However tab-size for CakePHP source code seem to be 4 but Emacs default is 8. So I add these to the file .emacs:
(setq default-tab-width 4)
Even .php files are highlighted but .ctp files, which is template, are not highlighted. So I add file-mode association list by editting .emacs again:
(setq auto-mode-alist
(cons ‘(”\\.ctp$” . php-mode)
auto-mode-alist))
I hope these modifications are adequate for developing software with CakePHP and Emacs. :-)
