]> code.delx.au - gnu-emacs/blobdiff - lispintro/emacs-lisp-intro.texi
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-35
[gnu-emacs] / lispintro / emacs-lisp-intro.texi
index 596bfebb5fad6526ea5ea6d454ecf3e6a07a6b46..3714e010d1831ad430a1dbb62291c1f459d2fcf5 100644 (file)
@@ -1,6 +1,7 @@
 \input texinfo                                  @c -*-texinfo-*-
 @comment %**start of header
 @setfilename ../info/eintr
+@c setfilename emacs-lisp-intro.info
 @c sethtmlfilename emacs-lisp-intro.html
 @settitle Programming in Emacs Lisp
 @syncodeindex vr cp
 
 @comment %**end of header
 
-@set edition-number 2.10
-@set update-date 2003 July 15
+@set edition-number 2.14
+@set update-date 2004 Oct 12
 
 @ignore
  ## Summary of shell commands to create various output formats:
 
+    pushd /usr/local/src/emacs/lispintro/
+
     ## Info output
     makeinfo --no-split --paragraph-indent=0 --verbose emacs-lisp-intro.texi
 
@@ -59,6 +62,8 @@
       ## View Info output with standalone reader
       info emacs-lisp-intro.info
 
+ ## popd
+
 @end ignore
 
 @c ================ Included Figures ================
@@ -178,7 +183,7 @@ people who are not programmers.
 Edition @value{edition-number}, @value{update-date}
 @sp 1
 Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1997, 2001,
-2002, 2003 Free Software Foundation, Inc.
+2002, 2003, 2004 Free Software Foundation, Inc.
 @sp 1
 
 @iftex
@@ -1048,13 +1053,16 @@ Robert J. Chassell
 @chapter List Processing
 
 To the untutored eye, Lisp is a strange programming language.  In Lisp
-code there are parentheses everywhere.  Some people even claim that the
-name stands for `Lots of Isolated Silly Parentheses'.  But the claim is
-unwarranted.  Lisp stands for LISt Processing, and the programming
-language handles @emph{lists} (and lists of lists) by putting them
-between parentheses.  The parentheses mark the boundaries of the list.
-Sometimes a list is preceded by a single apostrophe or quotation mark,
-@samp{'}.  Lists are the basis of Lisp.
+code there are parentheses everywhere.  Some people even claim that
+the name stands for `Lots of Isolated Silly Parentheses'.  But the
+claim is unwarranted.  Lisp stands for LISt Processing, and the
+programming language handles @emph{lists} (and lists of lists) by
+putting them between parentheses.  The parentheses mark the boundaries
+of the list.  Sometimes a list is preceded by a single apostrophe or
+quotation mark, @samp{'}@footnote{The single apostrophe or quotation
+mark is an abbreviation for the function @code{quote}; you need not
+think about functions now; functions are defined in @ref{Making
+Errors, , Generate an Error Message}.}  Lists are the basis of Lisp.
 
 @menu
 * Lisp Lists::                  What are lists?
@@ -2133,7 +2141,8 @@ Debugger entered--Lisp error:
 
 @need 1250
 As usual, the error message tries to be helpful and makes sense after you
-learn how to read it.
+learn how to read it.@footnote{@code{(quote hello)} is an expansion of
+the abbreviation @code{'hello}.}
 
 The first part of the error message is straightforward; it says
 @samp{wrong type argument}.  Next comes the mysterious jargon word
@@ -3519,7 +3528,7 @@ this.
 
 Alternatively, if the special letter-codes are not right for your
 application, you can pass your own arguments to @code{interactive} as
-a list.  @xref{interactive, , Using @code{Interactive}, elisp, The
+a list.  @xref{Using Interactive, , Using @code{Interactive}, elisp, The
 GNU Emacs Lisp Reference Manual}, for more information about this advanced
 technique.
 
@@ -4000,7 +4009,7 @@ the @dfn{else-part}, for the case when the true-or-false-test returns
 false.  When this happens, the second argument or then-part of the
 overall @code{if} expression is @emph{not} evaluated, but the third or
 else-part @emph{is} evaluated.  You might think of this as the cloudy
-day alternative for the decision `if it is warm and sunny, then go to
+day alternative for the decision ``if it is warm and sunny, then go to
 the beach, else read a book!''.
 
 The word ``else'' is not written in the Lisp code; the else-part of an
@@ -6088,7 +6097,7 @@ number.  This number is multiplied by the buffer size in the following
 expression:
 
 @smallexample
-(* (buffer-size) (prefix-numeric-value arg)
+(* (buffer-size) (prefix-numeric-value arg))
 @end smallexample
 
 @noindent
@@ -8066,8 +8075,8 @@ internal variables that you would not expect a user to change and for
 variables that you do expect a user to change.  Although you can still
 use @code{defvar} for user customizable variables, please use
 @code{defcustom} instead, since that special form provides a path into
-the Customization commands.  (@xref{defcustom, , Setting Variables
-with @code{defcustom}}.)
+the Customization commands.  (@xref{defcustom, , Specifying Variables
+using @code{defcustom}}.)
 
 When you specified a variable using the @code{defvar} special form,
 you could distinguish a readily settable variable from others by
@@ -8082,23 +8091,24 @@ string.  For example:
 @end group
 @end smallexample
 
+@findex set-variable
 @noindent
-This means that you could (and still can) use the @code{edit-options}
-command to change the value of
-@code{shell-command-default-error-buffer} temporarily.
-
-@findex edit-options
-However, options set using @code{edit-options} are set only for the
-duration of your editing session.  The new values are not saved
-between sessions.  Each time Emacs starts, it reads the original
+You could (and still can) use the @code{set-variable} command to
+change the value of @code{shell-command-default-error-buffer}
+temporarily.  However, options set using @code{set-variable} are set
+only for the duration of your editing session.  The new values are not
+saved between sessions.  Each time Emacs starts, it reads the original
 value, unless you change the value within your @file{.emacs} file,
 either by setting it manually or by using @code{customize}.
 @xref{Emacs Initialization, , Your @file{.emacs} File}.
 
-For me, the major use of the @code{edit-options} command is to suggest
-variables that I might want to set in my @file{.emacs} file.  I urge
-you to look through the list.  (@xref{Edit Options, , Editing Variable
-Values, emacs, The GNU Emacs Manual}.)
+For me, the major use of the @code{set-variable} command is to suggest
+variables that I might want to set in my @file{.emacs} file.  There
+are now more than 700 such variables --- far too many to remember
+readily.  Fortunately, you can press @key{TAB} after calling the
+@code{M-x set-variable} command to see the list of variables.
+(@xref{Examining, , Examining and Setting Variables, emacs,
+The GNU Emacs Manual}.)
 
 @node copy-region-as-kill, cons & search-fwd Review, defvar, Cutting & Storing Text
 @comment  node-name,  next,  previous,  up
@@ -9142,7 +9152,7 @@ address-boxes, the first of which holds the address of @code{violet},
 and the second of which holds the address of @code{buttercup}.
 
 A pair of address-boxes is called a @dfn{cons cell} or @dfn{dotted
-pair}.  @xref{List Type, , List Type , elisp, The GNU Emacs Lisp
+pair}.  @xref{Cons Cell Type, , Cons Cell and List Types, elisp, The GNU Emacs Lisp
 Reference Manual}, and @ref{Dotted Pair Notation, , Dotted Pair
 Notation, elisp, The GNU Emacs Lisp Reference Manual}, for more
 information about cons cells and dotted pairs.
@@ -14373,7 +14383,7 @@ version, you may have to evaluate the following:
 @end smallexample
 
 @noindent
-(@xref{defcustom, , Setting Variables with @code{defcustom}}.
+(@xref{defcustom, , Specifying Variables using @code{defcustom}}.)
 Then evaluate the @code{lengths-list-file} expression.)
 
 @need 1200
@@ -14921,10 +14931,10 @@ Here is the function:
        ((eq t (car (cdr (car current-directory-list))))
         ;; decide whether to skip or recurse
         (if
-            (equal (or "." "..")
+            (equal "."
                    (substring (car (car current-directory-list)) -1))
-            ;; then do nothing if filename is that of
-            ;;   current directory or parent
+            ;; then do nothing since filename is that of
+            ;;   current directory or parent, "." or ".."
             ()
 @end group
 @group
@@ -16125,9 +16135,9 @@ For example, the customizable user option variable
 The name of the variable is @code{text-mode-hook}; it has no default
 value; and its documentation string tells you what it does.
 
-The @code{:type} keyword tells Emacs what kind of data
-@code{text-mode-hook} should be set to and how to display the value in
-Customization buffer.
+The @code{:type} keyword tells Emacs the kind of data to which
+@code{text-mode-hook} should be set and how to display the value in a
+Customization buffer.
 
 The @code{:options} keyword specifies a suggested list of values for
 the variable.  Currently, you can use @code{:options} only for a hook.
@@ -17115,7 +17125,7 @@ problem recently.)
 @item  Ignore case when using `grep'@*
 @samp{-n}@w{  }   Prefix each line of output with line number@*
 @samp{-i}@w{  }   Ignore case distinctions@*
-@samp{-e}@w{  }   Protect patterns beginning with a hyphen character, @samp{-} 
+@samp{-e}@w{  }   Protect patterns beginning with a hyphen character, @samp{-}
 
 @smallexample
 (setq grep-command "grep  -n -i -e ")
@@ -17156,7 +17166,7 @@ If you want to write with Chinese `GB' characters, set this instead:
 @end itemize
 
 @subsubheading Fixing Unpleasant Key Bindings
-@cindex Key bindings, fixing 
+@cindex Key bindings, fixing
 @cindex Bindings, key, fixing unpleasant
 
 Some systems bind keys unpleasantly.  Sometimes, for example, the
@@ -18015,7 +18025,7 @@ beginning.
 
 Sometimes when you you write text, you duplicate words---as with ``you
 you'' near the beginning of this sentence.  I find that most
-frequently, I duplicate ``the'; hence, I call the function for
+frequently, I duplicate ``the''; hence, I call the function for
 detecting duplicated words, @code{the-the}.
 
 @need 1250
@@ -20635,6 +20645,7 @@ each column."
 @end smallexample
 @end ifnottex
 
+@c qqq
 @ignore
 Graphing Definitions Re-listed
 
@@ -21134,6 +21145,7 @@ each column."
     (print-X-axis numbers-list horizontal-step)))
 @end group
 @end smallexample
+@c qqq
 @end ignore
 
 @page