EMACS: Oops, PHP mode already has flymake settings
This commit is contained in:
parent
b90c7ddf68
commit
6e45e53b21
1 changed files with 0 additions and 19 deletions
|
@ -158,25 +158,6 @@
|
||||||
(add-hook 'c-mode-common-hook 'oni/c-mode-common-hook)
|
(add-hook 'c-mode-common-hook 'oni/c-mode-common-hook)
|
||||||
(add-hook 'c-mode-hook 'oni/c-mode-hook)
|
(add-hook 'c-mode-hook 'oni/c-mode-hook)
|
||||||
|
|
||||||
;;; Flymake
|
|
||||||
(require 'flymake)
|
|
||||||
|
|
||||||
(defun flymake-php-init ()
|
|
||||||
"Use php to check the syntax of the current file."
|
|
||||||
(let* ((temp (flymake-init-create-temp-buffer-copy
|
|
||||||
'flymake-create-temp-inplace))
|
|
||||||
(local (file-relative-name temp (file-name-directory
|
|
||||||
buffer-file-name))))
|
|
||||||
(list "php" (list "-f" local "-l"))))
|
|
||||||
|
|
||||||
(add-to-list
|
|
||||||
'flymake-err-line-patterns
|
|
||||||
'("\\(Parse\\|Fatal\\) error: +\\(.*?\\) in \\(.*?\\) on line \\([0-9]+\\)$"
|
|
||||||
3 4 nil 2))
|
|
||||||
|
|
||||||
(add-to-list 'flymake-allowed-file-name-masks
|
|
||||||
'("\\.php$" flymake-php-init))
|
|
||||||
|
|
||||||
;;; PHP mode
|
;;; PHP mode
|
||||||
(defun oni/php-show-outline ()
|
(defun oni/php-show-outline ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
Loading…
Reference in a new issue