-
Notifications
You must be signed in to change notification settings - Fork 1
flymake
sub edited this page Sep 13, 2010
·
14 revisions
For Emacs users, jsc provides a flymake compatible output.
In order to use Emacs+flymake+jsc follow these steps:
- add this code to your .emacs configuration file
;; flymake
(require 'flymake)
(defun flymake-javascript-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 "~/emacs.d/flymake-javascript" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks '("\\.js\\'"
flymake-javascript-init))
- create an executable file, ~/emacs.d/flymake-javascript, with this content
#! /bin/sh
jsc -a --flymake $1
- make the file executable
chmod +x ~/emacs.d/flymake-javascript
- start emacs and enable flymake-mode, start editing a js file and enjoy :-)
Thanks to Andrea Fazzi and Luca Greco for screenshots and snippets!