ネット接続時のみ
Validator.nu (X)HTML5 Validator
Download "command-line script"
Edit html5check.py
若干コードを修正
: # sys.stdout.write(response.read()) sys.stdout.write(response.read().replace("\nFrom line", " From line")) :
Permission
chmod 755 html5check.py
Init file
(defun flymake-html-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 "html5check.py" (list "" local-file)))) (add-to-list 'flymake-allowed-file-name-masks '("\\.html$\\|\\.ctp" flymake-html-init)) (add-to-list 'flymake-err-line-patterns ;; '("\\(Warning:.*?\\|Error:.*?\\)\nFrom line ?\\([0-9]+\\)+,.*?column ?\\([0-9]+\\).*" nil 2 3 1)) '("\\(Warning:.*?\\|Error:.*?\\)From line ?\\([0-9]+\\)+,.*?column ?\\([0-9]+\\).*?$" nil 2 3 1)) (add-hook 'html-mode-hook '(lambda () (flymake-mode t)))