Update the .emacs example to display trailing whitespace (nice and red by

default).  Americanize spelling while I'm at it:
	s/optimise/optimize/g &&
	s/intepret/interpret/g

PR:		docs/48371
Approved by:	ceri
This commit is contained in:
Sean Chittenden 2003-02-17 20:06:34 +00:00
parent c81c8f9f21
commit 563de07c7d
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=16037

View file

@ -253,11 +253,11 @@
<term>Python</term>
<listitem>
<para>Python is an Object-Oriented, intepreted language.
<para>Python is an Object-Oriented, interpreted language.
Its advocates argue that it is one of the best languages
to start programming with, since it is relatively easy
to start with, but is not limited in comparison to other
popular intepreted languages that are used for the
popular interpreted languages that are used for the
development of large, complex applications (Perl and
Tcl are two other languages that are popular for such tasks).</para>
@ -271,7 +271,7 @@
<term>Tcl and Tk</term>
<listitem>
<para>Tcl is an embeddable, intepreted language, that has
<para>Tcl is an embeddable, interpreted language, that has
become widely used and became popular mostly because of its portability to many
platforms. It can be used both for quickly writing
small, prototype applications, or (when combined with
@ -309,7 +309,7 @@
interpreter, such as writing code which interacts closely with
the operating system&mdash;or even writing your own operating
system! It is also useful if you need to write very efficient
code, as the compiler can take its time and optimise the code,
code, as the compiler can take its time and optimize the code,
which would not be acceptable in an interpreter. Moreover,
distributing a program written for a compiler is usually more
straightforward than one written for an interpreter&mdash;you
@ -526,17 +526,17 @@
<term><option>-O</option></term>
<listitem>
<para>Create an optimised version of the executable. The
<para>Create an optimized version of the executable. The
compiler performs various clever tricks to try and produce
an executable that runs faster than normal. You can add a
number after the <option>-O</option> to specify a higher
level of optimisation, but this often exposes bugs in the
compiler's optimiser. For instance, the version of
level of optimization, but this often exposes bugs in the
compiler's optimizer. For instance, the version of
<command>cc</command> that comes with the 2.1.0 release of
FreeBSD is known to produce bad code with the
<option>-O2</option> option in some circumstances.</para>
<para>Optimisation is usually only turned on when compiling
<para>Optimization is usually only turned on when compiling
a release version.</para>
<informalexample>
@ -544,7 +544,7 @@
</screen>
</informalexample>
<para>This will produce an optimised version of
<para>This will produce an optimized version of
<filename>foobar</filename>.</para>
</listitem>
</varlistentry>
@ -894,7 +894,7 @@ int main() {
</question>
<answer>
<para>Use <command>gdb</command> to analyse the core (see
<para>Use <command>gdb</command> to analyze the core (see
<xref linkend="debugging">).</para>
</answer>
</qandaentry>
@ -925,7 +925,7 @@ strcpy(foo, "bang!");
</listitem>
<listitem>
<para>Using a pointer that has not been initialised,
<para>Using a pointer that has not been initialized,
eg</para>
<programlisting>char *foo;
@ -1430,7 +1430,7 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
collection.</para>
<para>This section is intended to be an introduction to using
<command>gdb</command> and does not cover specialised topics
<command>gdb</command> and does not cover specialized topics
such as debugging the kernel.</para>
</sect2>
@ -1530,7 +1530,7 @@ bazz (anint=4231) at temp.c:17 <lineannotation><command>gdb</command> displays
(gdb) <userinput>p i</userinput> <lineannotation>Show us the value of <symbol>i</symbol></lineannotation>
$1 = 4231 <lineannotation><command>gdb</command> displays <literal>4231</literal></lineannotation></screen>
<para>Oh dear! Looking at the code, we forgot to initialise
<para>Oh dear! Looking at the code, we forgot to initialize
<symbol>i</symbol>. We meant to put</para>
<programlisting><lineannotation>&hellip;</lineannotation>
@ -1542,7 +1542,7 @@ main() {
<lineannotation>&hellip;</lineannotation></programlisting>
<para>but we left the <literal>i=5;</literal> line out. As we
did not initialise <symbol>i</symbol>, it had whatever number
did not initialize <symbol>i</symbol>, it had whatever number
happened to be in that area of memory when the program ran,
which in this case happened to be
<literal>4231</literal>.</para>
@ -1691,14 +1691,14 @@ else if (pid == 0) { /* child */
recommend 8MB in text mode and 16MB in X as the bare minimum
to get reasonable performance.</para>
<para>Emacs is basically a highly customisable
editor&mdash;indeed, it has been customised to the point where
<para>Emacs is basically a highly customizable
editor&mdash;indeed, it has been customized to the point where
it is more like an operating system than an editor! Many
developers and sysadmins do in fact spend practically all
their time working inside Emacs, leaving it only to log
out.</para>
<para>It is impossible even to summarise everything Emacs can do
<para>It is impossible even to summarize everything Emacs can do
here, but here are some of the features of interest to
developers:</para>
@ -1719,7 +1719,7 @@ else if (pid == 0) { /* child */
</listitem>
<listitem>
<para>Completely customisable.</para>
<para>Completely customizable.</para>
</listitem>
<listitem>
@ -2112,6 +2112,8 @@ in font-lock-auto-mode-list"
(put 'eval-expression 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'set-goal-column 'disabled nil)
(if (&gt;= emacs-major-version 21)
(setq show-trailing-whitespace t))
;; Elisp archive searching
(autoload 'format-lisp-code-directory "lispdir" nil t)
@ -2120,11 +2122,11 @@ in font-lock-auto-mode-list"
(autoload 'lisp-dir-verify "lispdir" nil t)
;; Font lock mode
(defun my-make-face (face colour &amp;optional bold)
"Create a face from a colour and optionally make it bold"
(defun my-make-face (face color &amp;optional bold)
"Create a face from a color and optionally make it bold"
(make-face face)
(copy-face 'default face)
(set-face-foreground face colour)
(set-face-foreground face color)
(if bold (make-face-bold face))
)