aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorSam Steingold2014-08-11 16:15:59 -0400
committerSam Steingold2014-08-11 16:15:59 -0400
commit70276d32c755dc94328463e102e7b3cbf8fefd55 (patch)
treee3a1aaebe5dddbfb268fadc9a3adc104a64b891d /lisp
parent26b49dfa0c3ef69bf1266e391aef55362f3bf618 (diff)
downloademacs-70276d32c755dc94328463e102e7b3cbf8fefd55.tar.gz
emacs-70276d32c755dc94328463e102e7b3cbf8fefd55.zip
Set sgml-validate-command based on validator existence
* lisp/textmodes/sgml-mode.el (sgml-validate-command): Set depending on the presence of known validators (tidy, (o)nsgmls).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/textmodes/sgml-mode.el21
2 files changed, 20 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2d7597e1971..8e214ec1d66 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-08-11 Sam Steingold <sds@gnu.org>
2
3 * textmodes/sgml-mode.el (sgml-validate-command): Set depending on
4 the presence of known validators (tidy, (o)nsgmls).
5
12014-08-11 Ulf Jasper <ulf.jasper@web.de> 62014-08-11 Ulf Jasper <ulf.jasper@web.de>
2 7
3 Newsticker: introduce `newsticker-treeview-date-format'. (Bug#17227) 8 Newsticker: introduce `newsticker-treeview-date-format'. (Bug#17227)
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index d2f1307b6c9..39ac0621733 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -240,12 +240,21 @@ This takes effect when first loading the `sgml-mode' library.")
240 "A table for mapping non-ASCII characters into SGML entity names. 240 "A table for mapping non-ASCII characters into SGML entity names.
241Currently, only Latin-1 characters are supported.") 241Currently, only Latin-1 characters are supported.")
242 242
243;; nsgmls is a free SGML parser in the SP suite available from 243(defcustom sgml-validate-command
244;; ftp.jclark.com and otherwise packaged for GNU systems. 244 ;; prefer tidy because (o)nsgmls is often built without --enable-http
245;; Its error messages can be parsed by next-error. 245 ;; which makes it next to useless
246;; The -s option suppresses output. 246 (cond ((executable-find "tidy")
247 247 ;; tidy is available from http://tidy.sourceforge.net/
248(defcustom sgml-validate-command "nsgmls -s" ; replaced old `sgmls' 248 "tidy --gnu-emacs yes -e -q")
249 ((executable-find "nsgmls")
250 ;; nsgmls is a free SGML parser in the SP suite available from
251 ;; ftp.jclark.com, replaced old `sgmls'.
252 "nsgmls -s")
253 ((executable-find "onsgmls")
254 ;; onsgmls is the community version of `nsgmls'
255 ;; hosted on http://openjade.sourceforge.net/
256 "onsgmls -s")
257 (t "Install (o)nsgmls, tidy, or some other SGML validator, and set `sgml-validate-command'"))
249 "The command to validate an SGML document. 258 "The command to validate an SGML document.
250The file name of current buffer file name will be appended to this, 259The file name of current buffer file name will be appended to this,
251separated by a space." 260separated by a space."