[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117689: Set sgml-validate-command based on validato
From: |
Sam Steingold |
Subject: |
[Emacs-diffs] trunk r117689: Set sgml-validate-command based on validator existence |
Date: |
Mon, 11 Aug 2014 20:16:02 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117689
revision-id: address@hidden
parent: address@hidden
committer: Sam Steingold <address@hidden>
branch nick: trunk
timestamp: Mon 2014-08-11 16:15:59 -0400
message:
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).
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/textmodes/sgml-mode.el sgmlmode.el-20091113204419-o5vbwnq5f7feedwu-497
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-08-11 18:08:13 +0000
+++ b/lisp/ChangeLog 2014-08-11 20:15:59 +0000
@@ -1,3 +1,8 @@
+2014-08-11 Sam Steingold <address@hidden>
+
+ * textmodes/sgml-mode.el (sgml-validate-command): Set depending on
+ the presence of known validators (tidy, (o)nsgmls).
+
2014-08-11 Ulf Jasper <address@hidden>
Newsticker: introduce `newsticker-treeview-date-format'. (Bug#17227)
=== modified file 'lisp/textmodes/sgml-mode.el'
--- a/lisp/textmodes/sgml-mode.el 2014-02-10 01:34:22 +0000
+++ b/lisp/textmodes/sgml-mode.el 2014-08-11 20:15:59 +0000
@@ -240,12 +240,21 @@
"A table for mapping non-ASCII characters into SGML entity names.
Currently, only Latin-1 characters are supported.")
-;; nsgmls is a free SGML parser in the SP suite available from
-;; ftp.jclark.com and otherwise packaged for GNU systems.
-;; Its error messages can be parsed by next-error.
-;; The -s option suppresses output.
-
-(defcustom sgml-validate-command "nsgmls -s" ; replaced old `sgmls'
+(defcustom sgml-validate-command
+ ;; prefer tidy because (o)nsgmls is often built without --enable-http
+ ;; which makes it next to useless
+ (cond ((executable-find "tidy")
+ ;; tidy is available from http://tidy.sourceforge.net/
+ "tidy --gnu-emacs yes -e -q")
+ ((executable-find "nsgmls")
+ ;; nsgmls is a free SGML parser in the SP suite available from
+ ;; ftp.jclark.com, replaced old `sgmls'.
+ "nsgmls -s")
+ ((executable-find "onsgmls")
+ ;; onsgmls is the community version of `nsgmls'
+ ;; hosted on http://openjade.sourceforge.net/
+ "onsgmls -s")
+ (t "Install (o)nsgmls, tidy, or some other SGML validator, and set
`sgml-validate-command'"))
"The command to validate an SGML document.
The file name of current buffer file name will be appended to this,
separated by a space."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117689: Set sgml-validate-command based on validator existence,
Sam Steingold <=