[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: making Flymake work with PHP
From: |
Ig0r |
Subject: |
Re: making Flymake work with PHP |
Date: |
Thu, 14 May 2009 09:08:44 -0700 (PDT) |
User-agent: |
G2/1.0 |
On May 14, 6:37 pm, Lennart Borgman <lennart.borg...@gmail.com> wrote:
> On Thu, May 14, 2009 at 4:35 PM, Ig0r <ryzhkov.i...@gmail.com> wrote:
> > Hello, GNU Emacs Community!
> > I'm new to emacs and I try to make Flymake work in php-mode.
> > I have nXhtml installed (it has its flymake)
> > I've took the flymake-php from:
> >http://sachachua.com/wp/2008/07/31/emacs-and-php-on-the-fly-syntax-ch...
> > and added those lines to my ~/.emacs
>
> > If I use M-x flymake-display-err-menu-for-current-line it displays an
> > error in format:
> > parse error
> > parse error
>
> > But in flymake-php I can see lines:
> > add-to-list 'flymake-err-line-patterns '("\\(Parse\\|Fatal\\) error: +
> > \\(.*?\\) in \\(.*?\\) on line \\([0-9]+\\)$" 3 4 nil 2))
>
> > So PHP errors should look like:
> > "Parse | Fatal error ... in ....php on line .. " ?
>
> > What may be the problem for that?
>
> > In my ~/.emacs I load nXhtml first:
>
> > ;;nXHTML mode and all that comes with it (MuMaMo...)
> > (setq rng-schema-loader-alist '(("rnc" . rng-c-load-schema)))
> > (add-hook 'nxml-mode-hook 'rng-nxml-mode-init)
> > (add-hook 'nxml-mode-hook 'nxml-enable-unicode-char-name-sets)
>
> > (load "c:/program files/emacs-22.3/site-lisp/nxhtml/autostart.el")
>
> > (define-key global-map "\C-cd" 'flymake-display-err-menu-for-current-
> > line)
> > (define-key global-map "\C-cn" 'flymake-goto-next-error)
>
> > (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))
>
> > (add-to-list 'flymake-allowed-file-name-masks '("\\.inc$" flymake-php-
> > init))
>
> > (add-hook 'php-mode-hook (lambda () (flymake-mode 1)))
>
> > Is someone familiar with this?
>
> Hi Igor,
>
> There is a flymake-php.el included in nXhtml. You turn that on from the menus:
>
> nXhtml
> Tools
> Flymake Mode
>
> Can you please try that?
Thanks for you reply!
I actually do that, but it's behavior is the same. Not a word from
php :(
- making Flymake work with PHP, Ig0r, 2009/05/14
- Re: making Flymake work with PHP, Lennart Borgman, 2009/05/14
- Message not available
- Re: making Flymake work with PHP,
Ig0r <=
- Re: making Flymake work with PHP, Anselm Helbig, 2009/05/14
- Re: making Flymake work with PHP, Ig0r, 2009/05/14
- Re: making Flymake work with PHP, Lennart Borgman, 2009/05/14
- Message not available
- Re: making Flymake work with PHP, Ig0r, 2009/05/14
- Re: making Flymake work with PHP, Ig0r, 2009/05/16