[Fwd: Re: DOCBOOK-APPS: psgml: how to set sgml-validate-command?]
- From: Gregory Leblanc <gleblanc linuxweasel com>
- To: gnome-doc-list gnome org
- Subject: [Fwd: Re: DOCBOOK-APPS: psgml: how to set sgml-validate-command?]
- Date: 09 Apr 2002 10:06:14 -0700
I know somebody asked me about this, and I gave them the solution that
Dave wrote for me, but this one looks even nicer.
Greg
--
Portland, Oregon, USA.
--- Begin Message ---
- From: "M.-A. DARCHE" <ma darche cynode org>
- To: docbook-apps <docbook-apps lists oasis-open org>
- Subject: Re: DOCBOOK-APPS: psgml: how to set sgml-validate-command?
- Date: Tue, 09 Apr 2002 17:19:53 +0200
On 2002-04-05 08:41 (Friday), Gunnar Sigurdsson wrote:
> Looking at the psgml source code reveals:
>
> (setq sgml-validate-command "nsgmls -wxml -s %s %s")
>
> all I want to do is to change the command to:
>
> nsgmls -wxml -wno-idref -s %s %s
>
> I have tried the obvious, putting this in the .emacs file:
>
> (setq sgml-validate-command "nsgmls -wxml -wno-idref -s %s %s")
>
> and doing the corresponding thing inside individual docbook files
> with no luck. The problem is that the above change has no effect
> the value of the remains the same ("nsgmls -wxml -s %s %s").
Here is what I advise you to do to change psgml variables :
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
(defun custom-xml-behavior() "Sets custom behavior for sgml mode"
(interactive)
(setq sgml-indent-data t)
(setq
sgml-validate-command "nsgmls -wxml -wno-idref -s %s %s"
))
(add-hook 'xml-mode-hook 'custom-xml-behavior)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I didn't find any other way to set psgml variables than creating a function.
Listed below is the function that I use :
(defun custom-sgml-behavior() "Sets custom behavior for sgml mode"
(interactive)
(setq sgml-indent-data t)
(setq
sgml-always-quote-attributes t
sgml-auto-insert-required-elements t
sgml-auto-activate-dtd t
sgml-indent-data t
sgml-indent-step 2
sgml-minimize-attributes "max"
;;sgml-minimize-attributes nil
sgml-omittag t
sgml-shortag t))
(add-hook 'sgml-mode-hook 'custom-sgml-behavior)
Let me know if it helps.
And of course if someone knows a better way to do it, let it be known.
Cheers,
--
Marc-Aurčle DARCHE <http://www.cynode.org>
AFUL <http://www.aful.org>
Association Francophone des Utilisateurs de Linux/Logiciels Libres
French speaking Linux and Libre Software Users' Association
--- End Message ---
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]