summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-05-13 22:42:17 -0400
committerGlenn Morris <rgm@gnu.org>2013-05-13 22:42:17 -0400
commit61aaeb01ce01f380c8e7033a6a0fc4849eaed3f8 (patch)
tree80a8a8ef6d52aa352883108402c9b149ec0d742b
parent29efd4698b7393c3df7c7419b3c250f29ef7497c (diff)
downloademacs-61aaeb01ce01f380c8e7033a6a0fc4849eaed3f8.tar.gz
* lisp/progmodes/flymake.el (flymake-xml-program): New option.
(flymake-xml-init): Use it.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/progmodes/flymake.el11
2 files changed, 13 insertions, 1 deletions
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 <rgm@gnu.org>
+ * 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)