LoginSignup
2
2

More than 5 years have passed since last update.

Tclでflymakeを使う

Posted at

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))

実行の様子

実行中

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2