Tclでflymakeを使う
準備
- AcitiveStateからTcl Dev Kitを購入する。ここが一番難易度が高いです。
- tclchecker.exeにPATHを通す
flymake.elを修正する。
warning の文字列定義を修正。他の言語のWanringを完全に殺してしまうので、思い切りが必要です。
963c963,964
< (if (and err-text (string-match "^[wW]arning" err-text))
---
> ; (if (and err-text (string-match "^[wW]arning" err-text))
> (if (and err-text (string-match "^(warn" err-text))
.emacsに追加
tclcheckerへのオプションはいろいろ試してみましょう。
.emacs
(require 'flymake)
(setq flymake-allowed-file-name-masks (cons '(".+\\.tcl$" flymake-simple-make-init) flymake-allowed-file-name-masks))
(defun flymake-get-make-cmdline (source base-dir)
(list "tclchecker" (list "-quiet" "-W3" "-suppress" "nonPortFile" "-suppress" "nonPortCmd" (concat base-dir source))))
(setq flymake-err-line-patterns
(cons
'("\\(.+\\):\\([0-9]+\\) \\(.+\\)" 1 2 nil 3)
flymake-err-line-patterns))