From: Mark A. Hershberger Date: Wed, 13 Feb 2008 19:30:58 +0000 (+0000) Subject: add support to flymake for php, add support to flymake for perl module files (.pm) X-Git-Tag: emacs-pretest-23.0.90~7967 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eabd11d4dadb1fd983e520d9a91eb89089177b21;p=emacs.git add support to flymake for php, add support to flymake for perl module files (.pm) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d95e064f164..876928350ba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2008-02-14 Mark A. Hershberger + + * progmodes/flymake.el (flymake-allowed-file-name-masks): Add + support for .pm files and .php files. + (flymake-err-line-patterns): Add pattern for PHP errors. + (flymake-php-init): New function. PHP support for flymake. + 2008-02-13 Michael Albinus * net/ange-ftp.el (ange-ftp-quote-string): Use diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 6de464b3b0d..757afdd79ee 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -271,7 +271,8 @@ are the string substitutions (see `format')." ("\\.xml\\'" flymake-xml-init) ("\\.html?\\'" flymake-xml-init) ("\\.cs\\'" flymake-simple-make-init) - ("\\.pl\\'" flymake-perl-init) + ("\\.p[ml]\\'" flymake-perl-init) + ("\\.php[345]?\\'" flymake-php-init) ("\\.h\\'" flymake-master-make-header-init flymake-master-cleanup) ("\\.java\\'" flymake-simple-make-java-init flymake-simple-java-cleanup) ("[0-9]+\\.tex\\'" flymake-master-tex-init flymake-master-cleanup) @@ -916,6 +917,8 @@ Convert it to flymake internal format." 1 3 nil 4) ;; perl ("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 2 3 nil 1) + ;; PHP + ("\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil 1) ;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1) ;; ant/javac (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)" @@ -1725,6 +1728,15 @@ Use CREATE-TEMP-F for creating temp copy." (file-name-directory buffer-file-name)))) (list "perl" (list "-wc " local-file)))) +;;;; php-specific init-cleanup routines +(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")))) + ;;;; tex-specific init-cleanup routines (defun flymake-get-tex-args (file-name) ;;(list "latex" (list "-c-style-errors" file-name))