From 61aaeb01ce01f380c8e7033a6a0fc4849eaed3f8 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 13 May 2013 22:42:17 -0400 Subject: [PATCH] * lisp/progmodes/flymake.el (flymake-xml-program): New option. (flymake-xml-init): Use it. --- lisp/ChangeLog | 3 +++ lisp/progmodes/flymake.el | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 29231c7d8ec..75002528d21 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-05-14 Glenn Morris + * progmodes/flymake.el (flymake-xml-program): New option. + (flymake-xml-init): Use it. + * term/xterm.el: Provide a feature. * term/sup-mouse.el: Move to obsolete/. Provide a feature. diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 0eb59bd06c3..79bccd138ee 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -257,6 +257,13 @@ are the string substitutions (see `format')." :version "23.1" :group 'tools) +(defcustom flymake-xml-program + (if (executable-find "xmlstarlet") "xmlstarlet" "xml") + "Program to use for XML validation." + :type 'file + :group 'flymake + :version "24.4") + (defcustom flymake-allowed-file-name-masks '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-simple-make-init) ("\\.xml\\'" flymake-xml-init) @@ -1852,7 +1859,9 @@ Use CREATE-TEMP-F for creating temp copy." ;;;; xml-specific init-cleanup routines (defun flymake-xml-init () - (list "xml" (list "val" (flymake-init-create-temp-buffer-copy 'flymake-create-temp-inplace)))) + (list flymake-xml-program + (list "val" (flymake-init-create-temp-buffer-copy + 'flymake-create-temp-inplace)))) (provide 'flymake) -- 2.39.2