aboutsummaryrefslogtreecommitdiff
path: root/en_US.ISO8859-1/books/fdp-primer/psgml-mode/chapter.xml
diff options
context:
space:
mode:
Diffstat (limited to 'en_US.ISO8859-1/books/fdp-primer/psgml-mode/chapter.xml')
-rw-r--r--en_US.ISO8859-1/books/fdp-primer/psgml-mode/chapter.xml169
1 files changed, 0 insertions, 169 deletions
diff --git a/en_US.ISO8859-1/books/fdp-primer/psgml-mode/chapter.xml b/en_US.ISO8859-1/books/fdp-primer/psgml-mode/chapter.xml
deleted file mode 100644
index 3f2177820f..0000000000
--- a/en_US.ISO8859-1/books/fdp-primer/psgml-mode/chapter.xml
+++ /dev/null
@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- Copyright (c) 1998, 1999 Nik Clayton, All rights reserved.
-
- Redistribution and use in source (SGML DocBook) and 'compiled' forms
- (SGML HTML, PDF, PostScript, RTF and so forth) with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code (SGML DocBook) must retain the above
- copyright notice, this list of conditions and the following
- disclaimer as the first lines of this file unmodified.
-
- 2. Redistributions in compiled form (transformed to other DTDs,
- converted to PDF, PostScript, RTF and other formats) must reproduce
- the above copyright notice, this list of conditions and the
- following disclaimer in the documentation and/or other materials
- provided with the distribution.
-
- THIS DOCUMENTATION IS PROVIDED BY NIK CLAYTON "AS IS" AND ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL NIK CLAYTON BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-
--->
-<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="psgml-mode">
- <title>Using <literal>sgml-mode</literal> with
- <application>Emacs</application></title>
-
- <para>Recent versions of <application>Emacs</application> (available
- from the Ports Collection) contain a very useful package called
- PSGML (can be installed from <package>editors/psgml</package>).
- Automatically invoked when a file with the
- <filename>.xml</filename> extension is loaded, or by typing
- <command>M-x sgml-mode</command>, it is a major mode for dealing
- with SGML files, elements and attributes.</para>
-
- <para>An understanding of some of the commands provided by this mode
- can make working with SGML documents such as the Handbook much
- easier.</para>
-
- <variablelist>
- <varlistentry>
- <term><command>C-c C-e</command></term>
-
- <listitem>
- <para>Runs <function>sgml-insert-element</function>. You will
- be prompted for the name of the element to insert at the
- current point. You can use the <keycap>Tab</keycap> key to
- complete the element. Elements that are not valid at the
- current point will be disallowed.</para>
-
- <para>The start and end tags for the element will be inserted.
- If the element contains other, mandatory, elements then
- these will be inserted as well.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><command>C-c =</command></term>
-
- <listitem>
- <para>Runs <function>sgml-change-element-name</function>.
- Place the point within an element and run this command. You
- will be prompted for the name of the element to change to.
- Both the start and end tags of the current element will be
- changed to the new element.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><command>C-c C-r</command></term>
-
- <listitem>
- <para>Runs <function>sgml-tag-region</function>. Select some
- text (move to start of text, <command>C-space</command>,
- move to end of text, <command>C-space</command>) and then
- run this command. You will be prompted for the element to
- use. This element will then be inserted immediately before
- and after your marked region.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><command>C-c -</command></term>
-
- <listitem>
- <para>Runs <function>sgml-untag-element</function>. Place the
- point within the start or end tag of an element you want to
- remove, and run this command. The element's start and end
- tags will be removed.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><command>C-c C-q</command></term>
-
- <listitem>
- <para>Runs <function>sgml-fill-element</function>. Will
- recursively fill (i.e., reformat) content from the current
- element in. The filling <emphasis>will</emphasis> affect
- content in which whitespace is significant, such as within
- <tag>programlisting</tag> elements, so run this
- command with care.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><command>C-c C-a</command></term>
-
- <listitem>
- <para>Runs <function>sgml-edit-attributes</function>. Opens a
- second buffer containing a list of all the attributes for
- the closest enclosing element, and their current values.
- Use <keycap>Tab</keycap> to navigate between attributes,
- <command>C-k</command> to remove an existing value and
- replace it with a new one, <command>C-c C-c</command> to
- close this buffer and return to the main document.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><command>C-c C-v</command></term>
-
- <listitem>
- <para>Runs <function>sgml-validate</function>. Prompts you to
- save the current document (if necessary) and then runs an
- SGML validator. The output from the validator is captured
- into a new buffer, and you can then navigate from one
- troublespot to the next, fixing markup errors as you
- go.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><command>C-c /</command></term>
-
- <listitem>
- <para>Runs <function>sgml-insert-end-tag</function>. Inserts
- the end tag for the current open element.</para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <para>Doubtless there are other useful functions of this mode, but
- those are the ones I use most often.</para>
-
- <para>You can also use the following entries in
- <filename>.emacs</filename> to set proper spacing, indentation,
- and column width for working with the Documentation
- Project.</para>
-
- <programlisting> (defun local-sgml-mode-hook
- (setq fill-column 70
- indent-tabs-mode nil
- next-line-add-newlines nil
- standard-indent 4
- sgml-indent-data t)
- (auto-fill-mode t)
- (setq sgml-catalog-files '("/usr/local/share/xml/catalog")))
- (add-hook 'psgml-mode-hook
- '(lambda () (local-psgml-mode-hook)))</programlisting>
-</chapter>