diff --git a/init.el b/init.el index 4e53fa1..7ae5542 100644 --- a/init.el +++ b/init.el @@ -32,8 +32,13 @@ ;;(pymacs-load "ropemacs" "rope-") ;; PHP and Drupal-Modes -(require 'php-mode) -(require 'drupal-mode) +;; http://stackoverflow.com/questions/898063/making-php-mode-and-other-cc-mode-derived-modes-compatible-with-emacs-23 +;; Use autoload for php-mode and drupal-mode to avoid occasionaly errors on some +;; systems when loading from init. See the above question on stack overflow +(autoload 'php-mode "php-mode" "Major mode for editing php code." t) +(autoload 'drupal-mode "drupal-mode" "Major mode for editing drupal php files." t) +;(require 'php-mode) +;(require 'drupal-mode) (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))