>>>>> "Ville" == Ville Skytt <Ville> writes:
Ville> On Sat, 2002-10-12 at 22:28, Adrian Aichner wrote:
>> Hello Ville, Rendhalver, hello PSGML-maintainers,
>> here is what I came up with to fix the apparent misbehavior of
>> sgml-validate in xml-mode.
>> See also
>> Please advise,
Ville> Looks good to me. Adrian, have you checked if this (the
Ville> patch or the bug) applies to a recent version of PSGML
Ville> (1.2.5 or 1.3.0)? We still have 1.2.2 in XEmacs
Ville> 1.3.0 alpha is available from
I am looking at the above now ...
It still uses defvar instead of defcustom everywhere.
It does have
It still refers to lucid, instead of xemacs, in many places.
xml-mode has a docstring too.
sgml-declaration is made buffer-local inside xml-mode, while
sgml-validate-command is made buffer-local right after its definition
(seems more natural).
It defconsts a new
which should be named
In summary, Ville, this brings me to the conclusion that my patch
should go into the XEmacs PSGML package now and that syncing of this
will be trivial.
Ville> Any ideas when there will be a new stable version of PSGML?
Ville> I realize we need to sync our version to a newer one, but
Ville> if a new version is just weeks away, it would be better to
Ville> sync into it instead of 1.2.5.
Ville> This is the main reason I asked the question above about
Ville> the applicability to upstream PSGML, I wouldn't want to
Ville> create unnecessary diffs this close to a sync. If this
Ville> patch is needed upstream too, I'm fine with applying it
Ville> right away to XEmacs CVS.
>> packages ChangeLog patch:
>> Diff command: cvs -q diff -U 0
>> Files affected: xemacs-packages/psgml/ChangeLog
>> Index: xemacs-packages/psgml/ChangeLog
>> RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/psgml/ChangeLog,v
>> retrieving revision 1.52
>> diff -u -U0 -r1.52 ChangeLog
>> --- xemacs-packages/psgml/ChangeLog 2002/10/07 11:21:40 1.52
>> +++ xemacs-packages/psgml/ChangeLog 2002/10/12 19:17:09
>> @@ -0,0 +1,13 @@
>> +2002-10-12 Adrian Aichner <adrian@...>
>> + * psgml.el (sgml-validate-command): Fix custom-type to agree with
>> + documentation and implementation.
>> + * psgml.el (sgml-xml-validate-command): New. Paralleling
>> + rationale for sgml-xml-declaration.
>> + * psgml.el (sgml-declaration): Make variable buffer-local to
>> + support xml-mode.
>> + * psgml.el (xml-mode): Add docstring, initialize
>> + `sgml-validate-command' and `sgml-declaration' from
>> + `sgml-xml-validate-command' and `sgml-xml-declaration'
>> + respectively.
>> packages source patch:
>> Diff command: cvs -f -z3 -q diff -u -N
>> Files affected: xemacs-packages/psgml/psgml.el
>> Index: xemacs-packages/psgml/psgml.el
>> RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/psgml/psgml.el,v
>> retrieving revision 1.18
>> diff -u -r1.18 psgml.el
>> --- xemacs-packages/psgml/psgml.el 2002/09/30 21:10:38 1.18
>> +++ xemacs-packages/psgml/psgml.el 2002/10/12 18:52:06
>> @@ -607,10 +607,16 @@
>> %s means the SGML declaration specified in the sgml-declaration variable
>> %d means the file containing the DOCTYPE declaration, if not in the buffer
>> -:type 'string
>> +:type '(choice string (repeat string))
>> :group 'psgml)
>> (make-variable-buffer-local 'sgml-validate-command)
>> +(defcustom sgml-xml-validate-command "onsgmls -wxml -s %s %s"
>> + "*The shell command to validate an SGML document being edited in
>> +`xml-mode'. See `sgml-validate-command' for details."
>> +:type '(choice string (repeat string))
>> +:group 'psgml)
>> (defcustom sgml-validate-files nil
>> "If non-nil, a function of no arguments that returns a list of file names.
>> These file names will serve as the arguments to the `sgml-validate-command'
>> @@ -631,6 +637,7 @@
>> :type '(choice (const nil) file)
>> :group 'psgml-dtd)
>> (put 'sgml-declaration 'sgml-type 'file-or-nil)
>> +(make-variable-buffer-local 'sgml-declaration)
>> (defcustom sgml-xml-declaration nil
>> "*If non-nil, this is the name of the SGML declaration for XML files."
>> @@ -1363,6 +1370,10 @@
>> (autoload 'xml-mode "psgml")
>> (define-derived-mode xml-mode sgml-mode "XML"
>> + "Major mode for editing XML documents.
>> +In this mode `sgml-validate-command' and `sgml-declaration' are
>> +initialized from `sgml-xml-validate-command' and
>> +`sgml-xml-declaration' respectively."
>> ;; XEmacs change
>> @@ -1375,11 +1386,8 @@
>> (setq sgml-namecase-general nil)
>> (setq sgml-minimize-attributes nil)
>> (setq sgml-always-quote-attributes t)
>> - (setq sgml-validate-command "nsgmls -wxml -s %s %s")
>> - ;; FIXME: why conditional?
>> - (unless sgml-declaration
>> - (make-local-variable 'sgml-declaration)
>> - (setq sgml-declaration sgml-xml-declaration)))
>> + (setq sgml-validate-command sgml-xml-validate-command)
>> + (setq sgml-declaration sgml-xml-declaration))
>> (defun sgml-default-dtd-file ()
>> (and (buffer-file-name)
>> Adrian Aichner
Ville> \/ille Skyttä
Ville> ville.skytta at xemacs.org