diff options
| -rw-r--r-- | doc/lispintro/ChangeLog | 14 | ||||
| -rw-r--r-- | doc/lispintro/Makefile.in | 12 | ||||
| -rw-r--r-- | doc/lispintro/emacs-lisp-intro.texi | 39 | ||||
| -rw-r--r-- | doc/lispintro/makefile.w32-in | 10 |
4 files changed, 55 insertions, 20 deletions
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog index a1ec47a7724..f39fec61f6e 100644 --- a/doc/lispintro/ChangeLog +++ b/doc/lispintro/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2013-04-24 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp-intro.texi (emacsver.texi): Include it. | ||
| 4 | (copying): For non-printed versions, uses Emacs version rather | ||
| 5 | than that of the printed book. | ||
| 6 | (Complications, Lisp macro, defvar and asterisk, defcustom): Copyedits. | ||
| 7 | * Makefile.in (emacsdir): New variable.. | ||
| 8 | (MAKEINFO_OPTS, ENVADD): Add $emacsdir. | ||
| 9 | (srcs): Add emacsver.texi. | ||
| 10 | (dist): Include emacsver.texi. Edit emacsdir. | ||
| 11 | * makefile.w32-in (emacsdir): New variable. | ||
| 12 | (INFO_SOURCES): Add emacsver.texi. | ||
| 13 | (ENVADD): Add $emacsdir (and $texinfodir). | ||
| 14 | |||
| 1 | 2013-04-23 Xue Fuqiao <xfq.free@gmail.com> | 15 | 2013-04-23 Xue Fuqiao <xfq.free@gmail.com> |
| 2 | 16 | ||
| 3 | * emacs-lisp-intro.texi (Complications, defvar, Writing Defuns) | 17 | * emacs-lisp-intro.texi (Complications, defvar, Writing Defuns) |
diff --git a/doc/lispintro/Makefile.in b/doc/lispintro/Makefile.in index a6b50b88ad9..338b4ad86c4 100644 --- a/doc/lispintro/Makefile.in +++ b/doc/lispintro/Makefile.in | |||
| @@ -25,6 +25,8 @@ version=@version@ | |||
| 25 | buildinfodir = $(srcdir)/../../info | 25 | buildinfodir = $(srcdir)/../../info |
| 26 | # Directory with the (customized) texinfo.tex file. | 26 | # Directory with the (customized) texinfo.tex file. |
| 27 | texinfodir = $(srcdir)/../misc | 27 | texinfodir = $(srcdir)/../misc |
| 28 | # Directory with emacsver.texi. | ||
| 29 | emacsdir = $(srcdir)/../emacs | ||
| 28 | 30 | ||
| 29 | MKDIR_P = @MKDIR_P@ | 31 | MKDIR_P = @MKDIR_P@ |
| 30 | 32 | ||
| @@ -33,17 +35,18 @@ INFO_EXT=@INFO_EXT@ | |||
| 33 | INFO_OPTS=@INFO_OPTS@ | 35 | INFO_OPTS=@INFO_OPTS@ |
| 34 | 36 | ||
| 35 | MAKEINFO = @MAKEINFO@ | 37 | MAKEINFO = @MAKEINFO@ |
| 36 | MAKEINFO_OPTS = --force -I $(srcdir) | 38 | MAKEINFO_OPTS = --force -I $(emacsdir) -I $(srcdir) |
| 37 | TEXI2DVI = texi2dvi | 39 | TEXI2DVI = texi2dvi |
| 38 | TEXI2PDF = texi2pdf | 40 | TEXI2PDF = texi2pdf |
| 39 | DVIPS = dvips | 41 | DVIPS = dvips |
| 40 | 42 | ||
| 41 | ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \ | 43 | ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \ |
| 42 | MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)" | 44 | MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)" |
| 43 | 45 | ||
| 44 | mkinfodir = @${MKDIR_P} ${buildinfodir} | 46 | mkinfodir = @${MKDIR_P} ${buildinfodir} |
| 45 | 47 | ||
| 46 | srcs = ${srcdir}/emacs-lisp-intro.texi ${srcdir}/doclicense.texi | 48 | srcs = ${srcdir}/emacs-lisp-intro.texi ${srcdir}/doclicense.texi \ |
| 49 | ${emacsdir}/emacsver.texi | ||
| 47 | 50 | ||
| 48 | .PHONY: info dvi html pdf ps | 51 | .PHONY: info dvi html pdf ps |
| 49 | 52 | ||
| @@ -97,9 +100,10 @@ dist: | |||
| 97 | rm -rf emacs-lispintro-${version} | 100 | rm -rf emacs-lispintro-${version} |
| 98 | mkdir emacs-lispintro-${version} | 101 | mkdir emacs-lispintro-${version} |
| 99 | cp ${srcdir}/*.texi ${srcdir}/*.eps ${srcdir}/*.pdf \ | 102 | cp ${srcdir}/*.texi ${srcdir}/*.eps ${srcdir}/*.pdf \ |
| 100 | ${texinfodir}/texinfo.tex \ | 103 | ${texinfodir}/texinfo.tex ${emacsdir}/emacsver.texi \ |
| 101 | ${srcdir}/ChangeLog* ${srcdir}/README emacs-lispintro-${version}/ | 104 | ${srcdir}/ChangeLog* ${srcdir}/README emacs-lispintro-${version}/ |
| 102 | sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \ | 105 | sed -e 's/@sr[c]dir@/./' -e 's/^\(texinfodir *=\).*/\1 ./' \ |
| 106 | -e 's/^\(emacsdir *=\).*/\1 ./' \ | ||
| 103 | -e 's/^\(buildinfodir *=\).*/\1 ./' \ | 107 | -e 's/^\(buildinfodir *=\).*/\1 ./' \ |
| 104 | -e 's/^\(clean:.*\)/\1 infoclean/' \ | 108 | -e 's/^\(clean:.*\)/\1 infoclean/' \ |
| 105 | -e "s/@ver[s]ion@/${version}/" \ | 109 | -e "s/@ver[s]ion@/${version}/" \ |
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index e0c51a9a8fb..be842b2b5d0 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi | |||
| @@ -8,6 +8,8 @@ | |||
| 8 | @syncodeindex fn cp | 8 | @syncodeindex fn cp |
| 9 | @finalout | 9 | @finalout |
| 10 | 10 | ||
| 11 | @include emacsver.texi | ||
| 12 | |||
| 11 | @c --------- | 13 | @c --------- |
| 12 | @c <<<< For hard copy printing, this file is now | 14 | @c <<<< For hard copy printing, this file is now |
| 13 | @c set for smallbook, which works for all sizes | 15 | @c set for smallbook, which works for all sizes |
| @@ -35,9 +37,9 @@ | |||
| 35 | \global\hbadness=6666 % don't worry about not-too-underfull boxes | 37 | \global\hbadness=6666 % don't worry about not-too-underfull boxes |
| 36 | @end tex | 38 | @end tex |
| 37 | 39 | ||
| 40 | @c These refer to the printed book sold by the FSF. | ||
| 38 | @set edition-number 3.10 | 41 | @set edition-number 3.10 |
| 39 | @set update-date 28 October 2009 | 42 | @set update-date 28 October 2009 |
| 40 | @c FIXME can this be updated? -- xfq | ||
| 41 | 43 | ||
| 42 | @ignore | 44 | @ignore |
| 43 | ## Summary of shell commands to create various output formats: | 45 | ## Summary of shell commands to create various output formats: |
| @@ -227,7 +229,12 @@ | |||
| 227 | This is an @cite{Introduction to Programming in Emacs Lisp}, for | 229 | This is an @cite{Introduction to Programming in Emacs Lisp}, for |
| 228 | people who are not programmers. | 230 | people who are not programmers. |
| 229 | @sp 1 | 231 | @sp 1 |
| 232 | @iftex | ||
| 230 | Edition @value{edition-number}, @value{update-date} | 233 | Edition @value{edition-number}, @value{update-date} |
| 234 | @end iftex | ||
| 235 | @ifnottex | ||
| 236 | Distributed with Emacs version @value{EMACSVER}. | ||
| 237 | @end ifnottex | ||
| 231 | @ifset WWW_GNU_ORG | 238 | @ifset WWW_GNU_ORG |
| 232 | @html | 239 | @html |
| 233 | <p>The homepage for GNU Emacs is at | 240 | <p>The homepage for GNU Emacs is at |
| @@ -244,7 +251,7 @@ Foundation, Inc. | |||
| 244 | @iftex | 251 | @iftex |
| 245 | Published by the:@* | 252 | Published by the:@* |
| 246 | 253 | ||
| 247 | GNU Press, @hfill @uref{http://www.fsf.org/campaigns/gnu-press/}@* | 254 | GNU Press, @hfill @uref{http://www.fsf.org/licensing/gnu-press/}@* |
| 248 | a division of the @hfill email: @email{sales@@fsf.org}@* | 255 | a division of the @hfill email: @email{sales@@fsf.org}@* |
| 249 | Free Software Foundation, Inc. @hfill Tel: +1 (617) 542-5942@* | 256 | Free Software Foundation, Inc. @hfill Tel: +1 (617) 542-5942@* |
| 250 | 51 Franklin Street, Fifth Floor @hfill Fax: +1 (617) 542-2652@* | 257 | 51 Franklin Street, Fifth Floor @hfill Fax: +1 (617) 542-2652@* |
| @@ -252,10 +259,10 @@ Boston, MA 02110-1301 USA | |||
| 252 | @end iftex | 259 | @end iftex |
| 253 | 260 | ||
| 254 | @ifnottex | 261 | @ifnottex |
| 255 | Published by the: | 262 | Printed copies available from @uref{http://shop.fsf.org/}. Published by: |
| 256 | 263 | ||
| 257 | @example | 264 | @example |
| 258 | GNU Press, http://www.fsf.org/campaigns/gnu-press/ | 265 | GNU Press, http://www.fsf.org/licensing/gnu-press/ |
| 259 | a division of the email: sales@@fsf.org | 266 | a division of the email: sales@@fsf.org |
| 260 | Free Software Foundation, Inc. Tel: +1 (617) 542-5942 | 267 | Free Software Foundation, Inc. Tel: +1 (617) 542-5942 |
| 261 | 51 Franklin Street, Fifth Floor Fax: +1 (617) 542-2652 | 268 | 51 Franklin Street, Fifth Floor Fax: +1 (617) 542-2652 |
| @@ -264,7 +271,6 @@ Boston, MA 02110-1301 USA | |||
| 264 | @end ifnottex | 271 | @end ifnottex |
| 265 | 272 | ||
| 266 | @sp 1 | 273 | @sp 1 |
| 267 | @c Printed copies are available from @uref{http://shop.fsf.org/} for $35 each.@* | ||
| 268 | ISBN 1-882114-43-4 | 274 | ISBN 1-882114-43-4 |
| 269 | 275 | ||
| 270 | Permission is granted to copy, distribute and/or modify this document | 276 | Permission is granted to copy, distribute and/or modify this document |
| @@ -1623,13 +1629,20 @@ do not work in the usual manner. Those that don't are called | |||
| 1623 | @dfn{special forms}. They are used for special jobs, like defining a | 1629 | @dfn{special forms}. They are used for special jobs, like defining a |
| 1624 | function, and there are not many of them. In the next few chapters, | 1630 | function, and there are not many of them. In the next few chapters, |
| 1625 | you will be introduced to several of the more important special forms. | 1631 | you will be introduced to several of the more important special forms. |
| 1626 | And there are also @dfn{macros}. Macro is a construct defined in | ||
| 1627 | Lisp, which differs from a function in that it translates a Lisp | ||
| 1628 | expression into another expression which is to be evaluated instead of | ||
| 1629 | the original expression. (@xref{Lisp macro}.) | ||
| 1630 | 1632 | ||
| 1633 | As well as special forms, there are also @dfn{macros}. A macro | ||
| 1634 | is a construct defined in Lisp, which differs from a function in that it | ||
| 1635 | translates a Lisp expression into another expression that is to be | ||
| 1636 | evaluated in place of the original expression. (@xref{Lisp macro}.) | ||
| 1637 | |||
| 1638 | For the purposes of this introduction, you do not need to worry too much | ||
| 1639 | about whether something is a special form, macro, or ordinary function. | ||
| 1640 | For example, @code{if} is a special form (@pxref{if}), but @code{when} | ||
| 1641 | is a macro (@pxref{Lisp macro}). In earlier versions of Emacs, | ||
| 1642 | @code{defun} was a special form, but now it is a macro (@pxref{defun}). | ||
| 1643 | It still behaves in the same way. | ||
| 1631 | 1644 | ||
| 1632 | The third and final complication is this: if the function that the | 1645 | The final complication is this: if the function that the |
| 1633 | Lisp interpreter is looking at is not a special form, and if it is part | 1646 | Lisp interpreter is looking at is not a special form, and if it is part |
| 1634 | of a list, the Lisp interpreter looks to see whether the list has a list | 1647 | of a list, the Lisp interpreter looks to see whether the list has a list |
| 1635 | inside of it. If there is an inner list, the Lisp interpreter first | 1648 | inside of it. If there is an inner list, the Lisp interpreter first |
| @@ -8313,7 +8326,7 @@ an @code{if} without the possibility of an else clause. In your mind, | |||
| 8313 | you can replace @code{when} with @code{if} and understand what goes | 8326 | you can replace @code{when} with @code{if} and understand what goes |
| 8314 | on. That is what the Lisp interpreter does. | 8327 | on. That is what the Lisp interpreter does. |
| 8315 | 8328 | ||
| 8316 | Technically speaking, @code{when} is a Lisp macro. A Lisp @dfn{macro} | 8329 | Technically speaking, @code{when} is a Lisp macro. A Lisp macro |
| 8317 | enables you to define new control constructs and other language | 8330 | enables you to define new control constructs and other language |
| 8318 | features. It tells the interpreter how to compute another Lisp | 8331 | features. It tells the interpreter how to compute another Lisp |
| 8319 | expression which will in turn compute the value. In this case, the | 8332 | expression which will in turn compute the value. In this case, the |
| @@ -9366,7 +9379,7 @@ In the past, Emacs used the @code{defvar} special form both for | |||
| 9366 | internal variables that you would not expect a user to change and for | 9379 | internal variables that you would not expect a user to change and for |
| 9367 | variables that you do expect a user to change. Although you can still | 9380 | variables that you do expect a user to change. Although you can still |
| 9368 | use @code{defvar} for user customizable variables, please use | 9381 | use @code{defvar} for user customizable variables, please use |
| 9369 | @code{defcustom} instead, since that special form provides a path into | 9382 | @code{defcustom} instead, since it provides a path into |
| 9370 | the Customization commands. (@xref{defcustom, , Specifying Variables | 9383 | the Customization commands. (@xref{defcustom, , Specifying Variables |
| 9371 | using @code{defcustom}}.) | 9384 | using @code{defcustom}}.) |
| 9372 | 9385 | ||
| @@ -17025,7 +17038,7 @@ Finally, the @code{:group} keyword tells the Emacs Customization | |||
| 17025 | command in which group the variable is located. This tells where to | 17038 | command in which group the variable is located. This tells where to |
| 17026 | find it. | 17039 | find it. |
| 17027 | 17040 | ||
| 17028 | The @code{defcustom} function recognizes more than a dozen keywords. | 17041 | The @code{defcustom} macro recognizes more than a dozen keywords. |
| 17029 | For more information, see @ref{Customization, , Writing Customization | 17042 | For more information, see @ref{Customization, , Writing Customization |
| 17030 | Definitions, elisp, The GNU Emacs Lisp Reference Manual}. | 17043 | Definitions, elisp, The GNU Emacs Lisp Reference Manual}. |
| 17031 | 17044 | ||
diff --git a/doc/lispintro/makefile.w32-in b/doc/lispintro/makefile.w32-in index 377112a80d2..c06e00ba757 100644 --- a/doc/lispintro/makefile.w32-in +++ b/doc/lispintro/makefile.w32-in | |||
| @@ -23,10 +23,13 @@ srcdir = . | |||
| 23 | infodir = $(srcdir)/../../info | 23 | infodir = $(srcdir)/../../info |
| 24 | # Directory with the (customized) texinfo.tex file. | 24 | # Directory with the (customized) texinfo.tex file. |
| 25 | texinfodir = $(srcdir)/../misc | 25 | texinfodir = $(srcdir)/../misc |
| 26 | # Directory with emacsver.texi. | ||
| 27 | emacsdir = $(srcdir)/../emacs | ||
| 26 | 28 | ||
| 27 | INFO_EXT=.info | 29 | INFO_EXT=.info |
| 28 | INFO_OPTS=--no-split | 30 | INFO_OPTS=--no-split |
| 29 | INFO_SOURCES = $(srcdir)/emacs-lisp-intro.texi $(srcdir)/doclicense.texi | 31 | INFO_SOURCES = $(srcdir)/emacs-lisp-intro.texi $(emacsdir)/emacsver.texi \ |
| 32 | $(srcdir)/doclicense.texi | ||
| 30 | # The file name eintr must fit within 5 characters, to allow for | 33 | # The file name eintr must fit within 5 characters, to allow for |
| 31 | # -NN extensions to fit into DOS 8+3 limits without clashing | 34 | # -NN extensions to fit into DOS 8+3 limits without clashing |
| 32 | INFO_TARGETS = $(infodir)/eintr$(INFO_EXT) | 35 | INFO_TARGETS = $(infodir)/eintr$(INFO_EXT) |
| @@ -37,8 +40,9 @@ INSTALL_INFO = install-info | |||
| 37 | TEXI2DVI = texi2dvi | 40 | TEXI2DVI = texi2dvi |
| 38 | TEXI2PDF = texi2pdf | 41 | TEXI2PDF = texi2pdf |
| 39 | DVIPS = dvips | 42 | DVIPS = dvips |
| 40 | ENVADD = $(srcdir)\..\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \ | 43 | ENVADD = $(srcdir)\..\..\nt\envadd.bat \ |
| 41 | "MAKEINFO=$(MAKEINFO) -I$(srcdir) -I$(texinfodir)" /C | 44 | "TEXINPUTS=$(srcdir);$(texinfodir);$(emacsdir);$(TEXINPUTS)" \ |
| 45 | "MAKEINFO=$(MAKEINFO) -I$(srcdir) -I$(emacsdir) -I$(texinfodir)" /C | ||
| 42 | 46 | ||
| 43 | .SUFFIXES: .dvi .ps .texi | 47 | .SUFFIXES: .dvi .ps .texi |
| 44 | 48 | ||