svn commit: r42382 - head/en_US.ISO8859-1/books/fdp-primer/writing-style

Warren Block wblock at FreeBSD.org
Mon Jul 22 20:27:55 UTC 2013


Author: wblock
Date: Mon Jul 22 20:27:54 2013
New Revision: 42382
URL: http://svnweb.freebsd.org/changeset/doc/42382

Log:
  Clarify the indentation section, replace the Emacs and Vim configuration
  mentions with an xref to the new editor config chapter.

Modified:
  head/en_US.ISO8859-1/books/fdp-primer/writing-style/chapter.xml

Modified: head/en_US.ISO8859-1/books/fdp-primer/writing-style/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/fdp-primer/writing-style/chapter.xml	Mon Jul 22 19:55:25 2013	(r42381)
+++ head/en_US.ISO8859-1/books/fdp-primer/writing-style/chapter.xml	Mon Jul 22 20:27:54 2013	(r42382)
@@ -299,9 +299,9 @@
     <sect2>
       <title>Indentation</title>
 
-      <para>Each file starts with indentation set at column 0,
+      <para>The first line in each file starts with no indentation,
 	<emphasis>regardless</emphasis> of the indentation level of
-	the file which might contain this one.</para>
+	the file which might contain the current file.</para>
 
       <para>Opening tags increase the indentation level by 2 spaces.
 	Closing tags decrease the indentation level by 2 spaces.
@@ -314,44 +314,27 @@
       <para>For example, the source for this section looks something
 	like:</para>
 
-      <programlisting><![CDATA[+--- This is column 0
-V
-<chapter>
-  <title>...</title>
+      <programlisting><sgmltag class="starttag">chapter</sgmltag>
+  <sgmltag class="starttag">title</sgmltag>...<sgmltag class="endtag">title</sgmltag>
 
-  <sect1>
-    <title>...</title>
+  <sgmltag class="starttag">sect1</sgmltag>
+    <sgmltag class="starttag">title</sgmltag>...<sgmltag class="endtag">title</sgmltag>
 
-    <sect2>
-      <title>Indentation</title>
+    <sgmltag class="starttag">sect2</sgmltag>
+      <sgmltag class="starttag">title</sgmltag>Indentation<sgmltag class="endtag">title</sgmltag>
 
-      <para>Each file starts with indentation set at column 0,
-        <emphasis>regardless</emphasis> of the indentation level of the file
-        which might contain this one.</para>
+      <sgmltag class="starttag">para</sgmltag>The first line in each file starts with no indentation,
+	<sgmltag class="starttag">emphasis</sgmltag>regardless<sgmltag class="endtag">emphasis</sgmltag> of the indentation level of
+	the file which might contain the current file.<sgmltag class="endtag">para</sgmltag>
 
       ...
-    </sect2>
-  </sect1>
-</chapter>]]></programlisting>
-
-      <para><application>Emacs</application> or
-	<application>XEmacs</application> should load
-	<literal>sgml-mode</literal> automatically,
-	and the <application>Emacs</application> local variables at
-	the bottom of each file should enforce these styles.</para>
-
-      <para><application>Vim</application> users might want to
-	configure their editor with:</para>
-
-      <programlisting>augroup sgmledit
-  autocmd FileType sgml set formatoptions=cq2l " Special formatting options
-  autocmd FileType sgml set textwidth=70       " Wrap lines at 70 columns
-  autocmd FileType sgml set shiftwidth=2       " Automatically indent
-  autocmd FileType sgml set softtabstop=2      " Tab key indents 2 spaces
-  autocmd FileType sgml set tabstop=8          " Replace 8 spaces with a tab
-  autocmd FileType sgml set autoindent         " Automatic indentation
-augroup END</programlisting>
-
+    <sgmltag class="endtag">sect2</sgmltag>
+  <sgmltag class="endtag">sect1</sgmltag>
+<sgmltag class="endtag">chapter</sgmltag></programlisting>
+
+      <para>Configurations to help various text editors conform to
+	these guidelines can be found in
+	<xref linkend="editor-config"/>.</para>
     </sect2>
 
     <sect2>


More information about the svn-doc-all mailing list