\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.12
-@set update-date 2003 Nov 19
+@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
## View Info output with standalone reader
info emacs-lisp-intro.info
+ ## popd
+
@end ignore
@c ================ Included Figures ================
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
@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?
@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
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
expression:
@smallexample
-(* (buffer-size) (prefix-numeric-value arg)
+(* (buffer-size) (prefix-numeric-value arg))
@end smallexample
@noindent
((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
@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 ")
@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
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
@end smallexample
@end ifnottex
+@c qqq
@ignore
Graphing Definitions Re-listed
(print-X-axis numbers-list horizontal-step)))
@end group
@end smallexample
+@c qqq
@end ignore
@page