我试图让JSHint与Flymake一起工作。Emacs - 无法让Flymake与JSHint一起工作
jshint
确实安装在/opt/bin
并正常工作。 /opt/bin
位于Emacs'exec-path
。
我已经按照the directions on the EmacsWiki在这个我:
(defun flymake-jshint-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 "jshint" (list local-file))))
(setq flymake-err-line-patterns
(cons '("^ [[:digit:]]+ \\([[:digit:]]+\\),\\([[:digit:]]+\\): \\(.+\\)$"
nil 1 2 3)
flymake-err-line-patterns))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.js\\'" flymake-jshint-init))
当我打开JavaScript文件,我的模式行显示为:
[(Javascript Flymake* AC)]
这很奇怪,因为通常*
没有按”当我用C++或Python使用Flymake时,不会出现。根据Flymake文档,Flymake*
表示“Flymake目前正在运行”。但是,Flymake没有显示任何错误。
我检查了*Messages*
缓冲区,但它只列出了几行Fontifying foo.js... (regexps...................)
。没有错误。
其他建议?