(require-package 'php-mode) (require-package 'ac-php) (autoload 'php-mode "php-mode" "Major mode for editing PHP code." t) (add-to-list 'auto-mode-alist '("\\.php$" . php-mode)) (add-to-list 'auto-mode-alist '("\\.inc$" . php-mode)) (add-hook 'php-mode-hook '(lambda () (auto-complete-mode t) (require 'ac-php) (setq ac-sources '(ac-source-php )) (setq ac-sources '(ac-source-dictionary ac-source-abbrev ac-source-php )) (ac-php-core-eldoc-setup ) ;; enable eldoc (define-key php-mode-map (kbd "C-]") 'ac-php-find-symbol-at-point) ;goto define (define-key php-mode-map (kbd "C-t") 'ac-php-location-stack-back) ;go back )) (require-package 'smarty-mode) (provide 'init-php)