* Flymake PHP Emacs
@ 2008-01-04 5:52 lampshade
[not found] ` <2c194b7e-454c-4a2d-860c-568824c3c6c4@m34g2000hsf.googlegro ups.com>
2008-01-05 18:23 ` Lennart Borgman (gmail)
0 siblings, 2 replies; 3+ messages in thread
From: lampshade @ 2008-01-04 5:52 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I've been trying to get flymake to work with PHP based off of a blog
post I saw here
http://www.blik.it/2007/02/21/syntax-checking-for-php-in-emacs/
But I've run into problems with it. When I try to enable it, I
receive the error
Flymake: Configuration error has occured while running (php -l
myfile.php). Flymake will be switched OFF
Nothing else appears in the message buffer.
my .emacs looks like
(add-to-list 'load-path "~/.emacs.d/")
(load "~/.emacs.d/flymake.php.el")
(require 'flymake-php)
(add-hook 'php-mode-user-hook 'flymake-php-load)
;; Flymake PHP Extension
(require 'flymake)
(defconst flymake-allowed-php-file-name-masks '(
("\\.php3\\'" flymake-php-init)
("\\.inc\\'" flymake-php-init)
("\\.php\\'" flymake-php-init))
"Filename extensions that switch on flymake-php mode syntax checks")
(defconst flymake-php-err-line-pattern-re '("(Parse|Fatal) error: (.*)
in (.*) on line ([0-9]+)" 3 4 nil 2)
"Regexp matching PHP error messages")
(defun flymake-php-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
;;(list "php" (list "-f" local-file "-l"))))
(list "php" (list "-l" local-file))))
(defun flymake-php-load ()
(setq flymake-allowed-file-name-masks (append flymake-allowed-file-
name-masks flymake-allowed-php-file-name-masks))
(setq flymake-err-line-patterns (cons flymake-php-err-line-pattern-re
flymake-err-line-patterns))
(flymake-mode t)
(local-set-key "C-cd" 'flymake-display-err-menu-for-current-line))
(provide 'flymake-php)
Any ideas?
Thanks in advance,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-05 18:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04 5:52 Flymake PHP Emacs lampshade
[not found] ` <2c194b7e-454c-4a2d-860c-568824c3c6c4@m34g2000hsf.googlegro ups.com>
2008-01-05 17:47 ` Johan Lindström
2008-01-05 18:23 ` Lennart Borgman (gmail)
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.