aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/init-php.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/init-php.el')
-rw-r--r--lisp/init-php.el28
1 files changed, 13 insertions, 15 deletions
diff --git a/lisp/init-php.el b/lisp/init-php.el
index 833707f..104d4c7 100644
--- a/lisp/init-php.el
+++ b/lisp/init-php.el
@@ -1,21 +1,19 @@
-(use-package php-mode)
(use-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))
+(use-package php-mode
+ :mode (("\\.php$" . php-mode)
+ ("\\.inc$" . php-mode))
+ :config
+ (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 ))
-(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
- ))
+ (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
(use-package smarty-mode)