First thing is to get emacs23 working with php and drupal modes - the instructions here give me obscure errors about c-lang-def only being used in a file. After a bit of hunting on the internet I found it is a problem with Emacs V23, and a simple work around is to put the php-mode.el and drupal-mode.el files in ~/.emacs.d, then add the following to ~/.emacs:
With that in my .emacs file, loading a .php or .module file starts php or drupal mode - success!; make sure the target directory is on your load-path(add-to-list 'load-path "~/.emacs.d")(autoload 'php-mode "php-mode" "Major mode for editing php code" t)(autoload 'drupal-mode "drupal-mode" "Major mode for editing drupal php " t)(add-to-list 'auto-mode-alist '("\\.\\(module\\|test\\|install\\|theme\\)$" . drupal-mode))(add-to-list 'auto-mode-alist '("\\.\\(php\\|inc\\)$" . php-mode))(add-to-list 'auto-mode-alist '("\\.info" . conf-windows-mode))
No comments:
Post a Comment