]> code.delx.au - gnu-emacs/blobdiff - doc/lispintro/emacs-lisp-intro.texi
Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca
[gnu-emacs] / doc / lispintro / emacs-lisp-intro.texi
index 04e3e0c8649d3944096788fc4c57dcd8d6e51fc7..3366ad6e7f73bdef5d367980c7b6a784792e4b77 100644 (file)
@@ -228,7 +228,8 @@ people who are not programmers.
 @sp 1
 Edition @value{edition-number}, @value{update-date}
 @sp 1
-Copyright @copyright{} 1990-1995, 1997, 2001-2012 Free Software Foundation, Inc.
+Copyright @copyright{} 1990--1995, 1997, 2001--2013 Free Software
+Foundation, Inc.
 @sp 1
 
 @iftex
@@ -238,7 +239,7 @@ GNU Press,               @hfill @uref{http://www.fsf.org/campaigns/gnu-press/}@*
 a division of the               @hfill email: @email{sales@@fsf.org}@*
 Free Software Foundation, Inc.  @hfill Tel: +1 (617) 542-5942@*
 51 Franklin Street, Fifth Floor @hfill Fax: +1 (617) 542-2652@*
-Boston, MA 02110-1301 USA       
+Boston, MA 02110-1301 USA
 @end iftex
 
 @ifnottex
@@ -249,7 +250,7 @@ GNU Press,                        http://www.fsf.org/campaigns/gnu-press/
 a division of the                 email: sales@@fsf.org
 Free Software Foundation, Inc.    Tel: +1 (617) 542-5942
 51 Franklin Street, Fifth Floor   Fax: +1 (617) 542-2652
-Boston, MA 02110-1301 USA          
+Boston, MA 02110-1301 USA
 @end example
 @end ifnottex
 
@@ -1053,7 +1054,7 @@ of Emacs Lisp, I am referring to GNU Emacs Lisp in particular.
 
 My thanks to all who helped me with this book.  My especial thanks to
 @r{Jim Blandy}, @r{Noah Friedman}, @w{Jim Kingdon}, @r{Roland
-McGrath}, @w{Frank Ritter}, @w{Randy Smith}, @w{Richard M.@:
+McGrath}, @w{Frank Ritter}, @w{Randy Smith}, @w{Richard M.
 Stallman}, and @w{Melissa Weisshaus}.  My thanks also go to both
 @w{Philip Johnson} and @w{David Stampe} for their patient
 encouragement.  My mistakes are my own.
@@ -1085,7 +1086,7 @@ Robert J. Chassell
 @c   has been already used, duplicate ignored
 @c I guess that is harmless (what happens if a later part of the text
 @c makes a link to something in the first 4 pages though?).
-@c Note that eg the Emacs manual has a preface, but does not bother
+@c E.g., note that the Emacs manual has a preface, but does not bother
 @c resetting the page numbers back to 1 after that.
 @iftex
 @headings off
@@ -3072,7 +3073,7 @@ All functions are defined in terms of other functions, except for a few
 language.  When you write functions' definitions, you will write them in
 Emacs Lisp and use other functions as your building blocks.  Some of the
 functions you will use will themselves be written in Emacs Lisp (perhaps
-by you) and some will be primitives written in C.  The primitive
+by you) and some will be primitives written in C@.  The primitive
 functions are used exactly like those written in Emacs Lisp and behave
 like them.  They are written in C so we can easily run GNU Emacs on any
 computer that has sufficient power and can run C.
@@ -6281,7 +6282,7 @@ the arithmetic, a conversion is necessary, and
 @findex / @r{(division)}
 @cindex Division
 The second argument is @code{(/ size 10)}.  This expression divides
-the numeric value by ten --- the numeric value of the size of the
+the numeric value by ten---the numeric value of the size of the
 accessible portion of the buffer.  This produces a number that tells
 how many characters make up one tenth of the buffer size.  (In Lisp,
 @code{/} is used for division, just as @code{*} is used for
@@ -6600,8 +6601,8 @@ buffer; or conversely, an Emacs Lisp function needs to work on all of a
 buffer that has been narrowed.  The @code{what-line} function, for
 example, removes the narrowing from a buffer, if it has any narrowing
 and when it has finished its job, restores the narrowing to what it was.
-On the other hand, the @code{count-lines} function, which is called by
-@code{what-line}, uses narrowing to restrict itself to just that portion
+On the other hand, the @code{count-lines} function
+uses narrowing to restrict itself to just that portion
 of the buffer in which it is interested and then restores the previous
 situation.
 
@@ -9029,7 +9030,7 @@ The last expression in the @code{kill-new} function adds the newly
 copied string to whatever facility exists for copying and pasting
 among different programs running in a windowing system.  In the X
 Windowing system, for example, the @code{x-select-text} function takes
-the string and stores it in memory operated by X.  You can paste the
+the string and stores it in memory operated by X@.  You can paste the
 string in another program, such as an Xterm.
 
 @need 1200
@@ -9402,7 +9403,7 @@ either by setting it manually or by using @code{customize}.
 
 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
+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,
@@ -9657,7 +9658,7 @@ This sounds more complicated than it is and is easier seen in a diagram:
 @noindent
 In the diagram, each box represents a word of computer memory that
 holds a Lisp object, usually in the form of a memory address.  The boxes,
-i.e.@: the addresses, are in pairs.  Each arrow points to what the address
+i.e., the addresses, are in pairs.  Each arrow points to what the address
 is the address of, either an atom or another pair of addresses.  The
 first box is the electronic address of @samp{rose} and the arrow points
 to @samp{rose}; the second box is the address of the next pair of boxes,
@@ -11195,8 +11196,8 @@ The @code{dolist} expression does very much the same as the
 of the work you have to do when writing a @code{while} expression.
 
 Like a @code{while} loop, a @code{dolist} loops.  What is different is
-that it automatically shortens the list each time it loops --- it
-`@sc{cdr}s down the list' on its own --- and it automatically binds
+that it automatically shortens the list each time it loops---it
+`@sc{cdr}s down the list' on its own---and it automatically binds
 the @sc{car} of each shorter version of the list to the first of its
 arguments.
 
@@ -13300,8 +13301,8 @@ We can see that this is a decrementing counter @code{while} loop,
 using the expression @code{(setq arg (1- arg))} as the decrementer.
 That expression is not far from the @code{while}, but is hidden in
 another Lisp macro, an @code{unless} macro.  Unless we are at the end
-of the buffer --- that is what the @code{eobp} function determines; it
-is an abbreviation of @samp{End Of Buffer P} --- we decrease the value
+of the buffer---that is what the @code{eobp} function determines; it
+is an abbreviation of @samp{End Of Buffer P}---we decrease the value
 of @code{arg} by one.
 
 (If we are at the end of the buffer, we cannot go forward any more and
@@ -15657,7 +15658,7 @@ as a list that looks like this (but with more elements):
 The @code{directory-files-and-attributes} function returns a list of
 lists.  Each of the lists within the main list consists of 13
 elements.  The first element is a string that contains the name of the
-file -- which, in GNU/Linux, may be a `directory file', that is to
+file---which, in GNU/Linux, may be a `directory file', that is to
 say, a file with the special attributes of a directory.  The second
 element of the list is @code{t} for a directory, a string
 for symbolic link (the string is the name linked to), or @code{nil}.
@@ -15680,14 +15681,14 @@ nil
 100
 @end group
 @group
-(17733 259)
-(17491 28834)
-(17596 62124)
-13157
-"-rw-rw-r--"
+(20615 27034 579989 697000)
+(17905 55681 0 0)
+(20615 26327 734791 805000)
+13188
+"-rw-r--r--"
 @end group
 @group
-nil
+t
 2971624
 773)
 @end group
@@ -16850,7 +16851,7 @@ Write a line graph version of the graph printing functions.
 @cindex Customizing your @file{.emacs} file
 @cindex Initialization file
 
-``You don't have to like Emacs to like it'' -- this seemingly
+``You don't have to like Emacs to like it''---this seemingly
 paradoxical statement is the secret of GNU Emacs.  The plain, `out of
 the box' Emacs is a generic tool.  Most people who use it, customize
 it to suit themselves.
@@ -17612,7 +17613,7 @@ For example:
 (load "~/emacs/slowsplit")
 @end smallexample
 
-This evaluates, i.e.@: loads, the @file{slowsplit.el} file or if it
+This evaluates, i.e., loads, the @file{slowsplit.el} file or if it
 exists, the faster, byte compiled @file{slowsplit.elc} file from the
 @file{emacs} sub-directory of your home directory.  The file contains
 the function @code{split-window-quietly}, which John Robinson wrote in
@@ -17909,10 +17910,10 @@ file that set values:
 @group
 ;; Set calendar highlighting colors
 (setq calendar-load-hook
-      '(lambda ()
-         (set-face-foreground 'diary-face   "skyblue")
-         (set-face-background 'holiday-face "slate blue")
-         (set-face-foreground 'holiday-face "white")))
+      (lambda ()
+        (set-face-foreground 'diary-face   "skyblue")
+        (set-face-background 'holiday-face "slate blue")
+        (set-face-foreground 'holiday-face "white")))
 @end group
 @end smallexample
 
@@ -18282,7 +18283,7 @@ or `All'.  (A lower case @samp{p} tell you the percentage above the
 @emph{top} of the window.)  @samp{%-} inserts enough dashes to fill
 out the line.
 
-Remember, ``You don't have to like Emacs to like it'' --- your own
+Remember, ``You don't have to like Emacs to like it''---your own
 Emacs can have different colors, different commands, and different
 keys than a default Emacs.
 
@@ -18781,7 +18782,7 @@ completes without problems.
 
 @item
 While running Edebug, type @kbd{?} to see a list of all the Edebug commands.
-(The @code{global-edebug-prefix} is usually @kbd{C-x X}, i.e.@:
+(The @code{global-edebug-prefix} is usually @kbd{C-x X}, i.e.,
 @kbd{@key{CTRL}-x} followed by an upper case @kbd{X}; use this prefix
 for commands made outside of the Edebug debugging buffer.)
 
@@ -20947,7 +20948,7 @@ not yet seen, @code{mapcar} and @code{lambda}.
 @group
 (defun one-fiftieth (full-range)
   "Return list, each number one-fiftieth of previous."
- (mapcar '(lambda (arg) (/ arg 50)) full-range))
+ (mapcar (lambda (arg) (/ arg 50)) full-range))
 @end group
 @end smallexample
 
@@ -21168,7 +21169,7 @@ and the second argument is @code{full-range}, which will be bound to
 The whole expression looks like this:
 
 @smallexample
-(mapcar '(lambda (arg) (/ arg 50)) full-range))
+(mapcar (lambda (arg) (/ arg 50)) full-range))
 @end smallexample
 
 @xref{Mapping Functions, , Mapping Functions, elisp, The GNU Emacs
@@ -21840,7 +21841,7 @@ each column."
 @group
 (defun one-fiftieth (full-range)
   "Return list, each number of which is 1/50th previous."
- (mapcar '(lambda (arg) (/ arg 50)) full-range))
+ (mapcar (lambda (arg) (/ arg 50)) full-range))
 @end group
 @end smallexample
 
@@ -21946,7 +21947,7 @@ Here is the graph:
 @sp 2
 
 @noindent
-The largest group of functions contain 10 -- 19 words and symbols each.
+The largest group of functions contain 10--19 words and symbols each.
 
 @node Free Software and Free Manuals
 @appendix Free Software and Free Manuals