When you install php-mode on Emacs, you must access some hidden files. So, First of all You have to go through the Terminal to reveal those hidden files.
1. Launch the Terminal And then type this command.
$ defaults write com.apple.finder AppleShowAllFiles -bool true
2. To restart finder, type this command.
$ killall Finder
( ! If you typed “killall finder”, Terminal doesn’t any response because of lower case of “F”)
3. In Terminal navigate to site-lisp directory
$ cd /usr/share/emacs/site-lisp
- 4.Download php-mode.el from Sourceforge.net
http://sourceforge.net/projects/php-mode/
5. To copy file into site-lisp , type this command
$ sudo cp ~/Downloads/php-mode-1.5.0/php-mode.el /usr/share/emacs/site-lisp/
6. Open “.emacs” hidden file in your home folder. And then Copy and Paste this text into “.emacs” file
(autoload ‘php-mode “php-mode” “PHP editing mode.” t)
(setq auto-mode-alist (cons ‘(“\\.php$” . php-mode) auto-mode-alist))
If you’ve error on loading this file, please update your character » and ‘.
7. Use Emacs to a php file. You should now have highlighted syntax!