Flymake for RELAX NG compact syntax

Inasmuch as the Wisent parsing and other CEDET/Speedbar/Semantic goodness for RELAX NG compact syntax files that I’m currently working on may not be ready for prime time for a while, here’s something to add to your .emacs so `flymake' runs Jing in the background to find syntax errors in your RELAX NG compact syntax files:

(require 'flymake)
(defun flymake-rnc-init ()
  (let* ((temp-file (flymake-init-create-temp-buffer-copy
     	 (local-file (file-relative-name
		      (file-name-directory buffer-file-name))))
    (list "jing" (list "-c" local-file))))
(add-to-list 'flymake-allowed-file-name-masks
(add-hook 'rnc-mode-hook

2 thoughts on “Flymake for RELAX NG compact syntax

  1. And is flymake a part of standard emacs please…
    (I didn’t even know that jing could validate compact syntax!)

    Thanks Tony

  2. Yes, flymake is part of standard Emacs. You could also try `flyspell-mode' for on-the-fly spelling checking.

Comments are closed.