annotate doc/lispref/intro.texi @ 103549:3ff935d94ca3

(Vfont_log): Extern it. (FONT_ADD_LOG, FONT_DEFERRED_LOG): New macros.
author Kenichi Handa <handa@m17n.org>
date Tue, 23 Jun 2009 05:53:28 +0000
parents 47ff541effb4
children 1d1d5d9bd884
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
1 @c -*-texinfo-*-
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
2 @c This is part of the GNU Emacs Lisp Reference Manual.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 2001, 2002, 2003, 2004,
100974
cb5d2387102c Add 2009 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 99916
diff changeset
4 @c 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
5 @c See the file elisp.texi for copying conditions.
84116
0ba80d073e27 (setfilename): Go up one more level to ../../info.
Glenn Morris <rgm@gnu.org>
parents: 84077
diff changeset
6 @setfilename ../../info/intro
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
7
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
8 @node Introduction, Lisp Data Types, Top, Top
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
9 @comment node-name, next, previous, up
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
10 @chapter Introduction
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
11
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
12 Most of the GNU Emacs text editor is written in the programming
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
13 language called Emacs Lisp. You can write new code in Emacs Lisp and
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
14 install it as an extension to the editor. However, Emacs Lisp is more
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
15 than a mere ``extension language''; it is a full computer programming
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
16 language in its own right. You can use it as you would any other
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
17 programming language.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
18
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
19 Because Emacs Lisp is designed for use in an editor, it has special
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
20 features for scanning and parsing text as well as features for handling
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
21 files, buffers, displays, subprocesses, and so on. Emacs Lisp is
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
22 closely integrated with the editing facilities; thus, editing commands
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
23 are functions that can also conveniently be called from Lisp programs,
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
24 and parameters for customization are ordinary Lisp variables.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
25
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
26 This manual attempts to be a full description of Emacs Lisp. For a
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
27 beginner's introduction to Emacs Lisp, see @cite{An Introduction to
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
28 Emacs Lisp Programming}, by Bob Chassell, also published by the Free
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
29 Software Foundation. This manual presumes considerable familiarity with
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
30 the use of Emacs for editing; see @cite{The GNU Emacs Manual} for this
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
31 basic information.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
32
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
33 Generally speaking, the earlier chapters describe features of Emacs
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
34 Lisp that have counterparts in many programming languages, and later
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
35 chapters describe features that are peculiar to Emacs Lisp or relate
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
36 specifically to editing.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
37
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
38 This is edition @value{VERSION} of the GNU Emacs Lisp Reference
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
39 Manual, corresponding to Emacs version @value{EMACSVER}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
40
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
41 @menu
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
42 * Caveats:: Flaws and a request for help.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
43 * Lisp History:: Emacs Lisp is descended from Maclisp.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
44 * Conventions:: How the manual is formatted.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
45 * Version Info:: Which Emacs version is running?
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
46 * Acknowledgements:: The authors, editors, and sponsors of this manual.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
47 @end menu
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
48
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
49 @node Caveats
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
50 @section Caveats
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
51 @cindex bugs in this manual
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
52
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
53 This manual has gone through numerous drafts. It is nearly complete
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
54 but not flawless. There are a few topics that are not covered, either
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
55 because we consider them secondary (such as most of the individual
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
56 modes) or because they are yet to be written. Because we are not able
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
57 to deal with them completely, we have left out several parts
97142
c3512b2085a0 * bitmaps/README:
Dan Nicolaescu <dann@ics.uci.edu>
parents: 95947
diff changeset
58 intentionally.
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
59
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
60 The manual should be fully correct in what it does cover, and it is
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
61 therefore open to criticism on anything it says---from specific examples
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
62 and descriptive text, to the ordering of chapters and sections. If
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
63 something is confusing, or you find that you have to look at the sources
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
64 or experiment to learn something not covered in the manual, then perhaps
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
65 the manual should be fixed. Please let us know.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
66
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
67 @iftex
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
68 As you use this manual, we ask that you mark pages with corrections so
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
69 you can later look them up and send them to us. If you think of a simple,
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
70 real-life example for a function or group of functions, please make an
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
71 effort to write it up and send it in. Please reference any comments to
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
72 the chapter name, section name, and function name, as appropriate, since
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
73 page numbers and chapter and section numbers will change and we may have
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
74 trouble finding the text you are talking about. Also state the number
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
75 of the edition you are criticizing.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
76 @end iftex
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
77 @ifnottex
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
78
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
79 As you use this manual, we ask that you send corrections as soon as you
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
80 find them. If you think of a simple, real life example for a function
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
81 or group of functions, please make an effort to write it up and send it
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
82 in. Please reference any comments to the node name and function or
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
83 variable name, as appropriate. Also state the number of the edition
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
84 you are criticizing.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
85 @end ifnottex
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
86
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
87 @cindex bugs
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
88 @cindex suggestions
95947
de02caa08f70 Report bugs using M-x report-emacs-bug.
Glenn Morris <rgm@gnu.org>
parents: 93814
diff changeset
89 Please send comments and corrections using @kbd{M-x report-emacs-bug}.
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
90
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
91 @node Lisp History
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
92 @section Lisp History
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
93 @cindex Lisp history
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
94
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
95 Lisp (LISt Processing language) was first developed in the late 1950s
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
96 at the Massachusetts Institute of Technology for research in artificial
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
97 intelligence. The great power of the Lisp language makes it ideal
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
98 for other purposes as well, such as writing editing commands.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
99
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
100 @cindex Maclisp
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
101 @cindex Common Lisp
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
102 Dozens of Lisp implementations have been built over the years, each
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
103 with its own idiosyncrasies. Many of them were inspired by Maclisp,
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
104 which was written in the 1960s at MIT's Project MAC. Eventually the
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
105 implementors of the descendants of Maclisp came together and developed a
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
106 standard for Lisp systems, called Common Lisp. In the meantime, Gerry
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
107 Sussman and Guy Steele at MIT developed a simplified but very powerful
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
108 dialect of Lisp, called Scheme.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
109
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
110 GNU Emacs Lisp is largely inspired by Maclisp, and a little by Common
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
111 Lisp. If you know Common Lisp, you will notice many similarities.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
112 However, many features of Common Lisp have been omitted or
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
113 simplified in order to reduce the memory requirements of GNU Emacs.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
114 Sometimes the simplifications are so drastic that a Common Lisp user
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
115 might be very confused. We will occasionally point out how GNU Emacs
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
116 Lisp differs from Common Lisp. If you don't know Common Lisp, don't
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
117 worry about it; this manual is self-contained.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
118
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
119 @pindex cl
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
120 A certain amount of Common Lisp emulation is available via the
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
121 @file{cl} library. @inforef{Top, Overview, cl}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
122
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
123 Emacs Lisp is not at all influenced by Scheme; but the GNU project has
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
124 an implementation of Scheme, called Guile. We use Guile in all new GNU
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
125 software that calls for extensibility.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
126
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
127 @node Conventions
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
128 @section Conventions
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
129
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
130 This section explains the notational conventions that are used in this
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
131 manual. You may want to skip this section and refer back to it later.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
132
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
133 @menu
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
134 * Some Terms:: Explanation of terms we use in this manual.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
135 * nil and t:: How the symbols @code{nil} and @code{t} are used.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
136 * Evaluation Notation:: The format we use for examples of evaluation.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
137 * Printing Notation:: The format we use when examples print text.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
138 * Error Messages:: The format we use for examples of errors.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
139 * Buffer Text Notation:: The format we use for buffer contents in examples.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
140 * Format of Descriptions:: Notation for describing functions, variables, etc.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
141 @end menu
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
142
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
143 @node Some Terms
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
144 @subsection Some Terms
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
145
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
146 Throughout this manual, the phrases ``the Lisp reader'' and ``the Lisp
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
147 printer'' refer to those routines in Lisp that convert textual
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
148 representations of Lisp objects into actual Lisp objects, and vice
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
149 versa. @xref{Printed Representation}, for more details. You, the
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
150 person reading this manual, are thought of as ``the programmer'' and are
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
151 addressed as ``you.'' ``The user'' is the person who uses Lisp
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
152 programs, including those you write.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
153
93814
e024e293c965 (Some Terms): Change "fonts in this manual" index entry to
Chong Yidong <cyd@stupidchicken.com>
parents: 87649
diff changeset
154 @cindex typographic conventions
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
155 Examples of Lisp code are formatted like this: @code{(list 1 2 3)}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
156 Names that represent metasyntactic variables, or arguments to a function
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
157 being described, are formatted like this: @var{first-number}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
158
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
159 @node nil and t
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
160 @subsection @code{nil} and @code{t}
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
161 @cindex truth value
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
162 @cindex boolean
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
163
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
164 @cindex @code{nil}
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
165 @cindex false
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
166 In Lisp, the symbol @code{nil} has three separate meanings: it
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
167 is a symbol with the name @samp{nil}; it is the logical truth value
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
168 @var{false}; and it is the empty list---the list of zero elements.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
169 When used as a variable, @code{nil} always has the value @code{nil}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
170
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
171 As far as the Lisp reader is concerned, @samp{()} and @samp{nil} are
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
172 identical: they stand for the same object, the symbol @code{nil}. The
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
173 different ways of writing the symbol are intended entirely for human
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
174 readers. After the Lisp reader has read either @samp{()} or @samp{nil},
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
175 there is no way to determine which representation was actually written
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
176 by the programmer.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
177
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
178 In this manual, we write @code{()} when we wish to emphasize that it
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
179 means the empty list, and we write @code{nil} when we wish to emphasize
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
180 that it means the truth value @var{false}. That is a good convention to use
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
181 in Lisp programs also.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
182
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
183 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
184 (cons 'foo ()) ; @r{Emphasize the empty list}
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
185 (setq foo-flag nil) ; @r{Emphasize the truth value @var{false}}
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
186 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
187
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
188 @cindex @code{t}
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
189 @cindex true
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
190 In contexts where a truth value is expected, any non-@code{nil} value
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
191 is considered to be @var{true}. However, @code{t} is the preferred way
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
192 to represent the truth value @var{true}. When you need to choose a
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
193 value which represents @var{true}, and there is no other basis for
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
194 choosing, use @code{t}. The symbol @code{t} always has the value
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
195 @code{t}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
196
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
197 In Emacs Lisp, @code{nil} and @code{t} are special symbols that always
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
198 evaluate to themselves. This is so that you do not need to quote them
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
199 to use them as constants in a program. An attempt to change their
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
200 values results in a @code{setting-constant} error. @xref{Constant
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
201 Variables}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
202
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
203 @defun booleanp object
99916
99af427b4d7f (nil and t): Fix typo.
Chong Yidong <cyd@stupidchicken.com>
parents: 97142
diff changeset
204 Return non-@code{nil} if @var{object} is one of the two canonical
99af427b4d7f (nil and t): Fix typo.
Chong Yidong <cyd@stupidchicken.com>
parents: 97142
diff changeset
205 boolean values: @code{t} or @code{nil}.
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
206 @end defun
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
207
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
208 @node Evaluation Notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
209 @subsection Evaluation Notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
210 @cindex evaluation notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
211 @cindex documentation notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
212 @cindex notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
213
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
214 A Lisp expression that you can evaluate is called a @dfn{form}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
215 Evaluating a form always produces a result, which is a Lisp object. In
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
216 the examples in this manual, this is indicated with @samp{@result{}}:
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
217
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
218 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
219 (car '(1 2))
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
220 @result{} 1
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
221 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
222
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
223 @noindent
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
224 You can read this as ``@code{(car '(1 2))} evaluates to 1.''
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
225
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
226 When a form is a macro call, it expands into a new form for Lisp to
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
227 evaluate. We show the result of the expansion with
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
228 @samp{@expansion{}}. We may or may not show the result of the
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
229 evaluation of the expanded form.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
230
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
231 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
232 (third '(a b c))
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
233 @expansion{} (car (cdr (cdr '(a b c))))
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
234 @result{} c
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
235 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
236
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
237 Sometimes to help describe one form we show another form that
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
238 produces identical results. The exact equivalence of two forms is
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
239 indicated with @samp{@equiv{}}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
240
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
241 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
242 (make-sparse-keymap) @equiv{} (list 'keymap)
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
243 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
244
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
245 @node Printing Notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
246 @subsection Printing Notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
247 @cindex printing notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
248
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
249 Many of the examples in this manual print text when they are
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
250 evaluated. If you execute example code in a Lisp Interaction buffer
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
251 (such as the buffer @samp{*scratch*}), the printed text is inserted into
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
252 the buffer. If you execute the example by other means (such as by
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
253 evaluating the function @code{eval-region}), the printed text is
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
254 displayed in the echo area.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
255
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
256 Examples in this manual indicate printed text with @samp{@print{}},
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
257 irrespective of where that text goes. The value returned by
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
258 evaluating the form (here @code{bar}) follows on a separate line with
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
259 @samp{@result{}}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
260
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
261 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
262 @group
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
263 (progn (prin1 'foo) (princ "\n") (prin1 'bar))
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
264 @print{} foo
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
265 @print{} bar
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
266 @result{} bar
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
267 @end group
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
268 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
269
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
270 @node Error Messages
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
271 @subsection Error Messages
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
272 @cindex error message notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
273
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
274 Some examples signal errors. This normally displays an error message
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
275 in the echo area. We show the error message on a line starting with
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
276 @samp{@error{}}. Note that @samp{@error{}} itself does not appear in
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
277 the echo area.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
278
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
279 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
280 (+ 23 'x)
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
281 @error{} Wrong type argument: number-or-marker-p, x
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
282 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
283
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
284 @node Buffer Text Notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
285 @subsection Buffer Text Notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
286 @cindex buffer text notation
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
287
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
288 Some examples describe modifications to the contents of a buffer, by
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
289 showing the ``before'' and ``after'' versions of the text. These
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
290 examples show the contents of the buffer in question between two lines
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
291 of dashes containing the buffer name. In addition, @samp{@point{}}
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
292 indicates the location of point. (The symbol for point, of course, is
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
293 not part of the text in the buffer; it indicates the place
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
294 @emph{between} two characters where point is currently located.)
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
295
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
296 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
297 ---------- Buffer: foo ----------
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
298 This is the @point{}contents of foo.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
299 ---------- Buffer: foo ----------
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
300
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
301 (insert "changed ")
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
302 @result{} nil
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
303 ---------- Buffer: foo ----------
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
304 This is the changed @point{}contents of foo.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
305 ---------- Buffer: foo ----------
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
306 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
307
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
308 @node Format of Descriptions
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
309 @subsection Format of Descriptions
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
310 @cindex description format
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
311
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
312 Functions, variables, macros, commands, user options, and special
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
313 forms are described in this manual in a uniform format. The first
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
314 line of a description contains the name of the item followed by its
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
315 arguments, if any.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
316 @ifnottex
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
317 The category---function, variable, or whatever---appears at the
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
318 beginning of the line.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
319 @end ifnottex
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
320 @iftex
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
321 The category---function, variable, or whatever---is printed next to the
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
322 right margin.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
323 @end iftex
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
324 The description follows on succeeding lines, sometimes with examples.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
325
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
326 @menu
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
327 * A Sample Function Description:: A description of an imaginary
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
328 function, @code{foo}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
329 * A Sample Variable Description:: A description of an imaginary
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
330 variable,
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
331 @code{electric-future-map}.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
332 @end menu
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
333
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
334 @node A Sample Function Description
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
335 @subsubsection A Sample Function Description
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
336 @cindex function descriptions
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
337 @cindex command descriptions
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
338 @cindex macro descriptions
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
339 @cindex special form descriptions
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
340
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
341 In a function description, the name of the function being described
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
342 appears first. It is followed on the same line by a list of argument
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
343 names. These names are also used in the body of the description, to
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
344 stand for the values of the arguments.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
345
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
346 The appearance of the keyword @code{&optional} in the argument list
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
347 indicates that the subsequent arguments may be omitted (omitted
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
348 arguments default to @code{nil}). Do not write @code{&optional} when
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
349 you call the function.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
350
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
351 The keyword @code{&rest} (which must be followed by a single
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
352 argument name) indicates that any number of arguments can follow. The
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
353 single argument name following @code{&rest} will receive, as its
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
354 value, a list of all the remaining arguments passed to the function.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
355 Do not write @code{&rest} when you call the function.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
356
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
357 Here is a description of an imaginary function @code{foo}:
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
358
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
359 @defun foo integer1 &optional integer2 &rest integers
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
360 The function @code{foo} subtracts @var{integer1} from @var{integer2},
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
361 then adds all the rest of the arguments to the result. If @var{integer2}
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
362 is not supplied, then the number 19 is used by default.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
363
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
364 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
365 (foo 1 5 3 9)
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
366 @result{} 16
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
367 (foo 5)
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
368 @result{} 14
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
369 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
370
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
371 @need 1500
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
372 More generally,
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
373
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
374 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
375 (foo @var{w} @var{x} @var{y}@dots{})
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
376 @equiv{}
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
377 (+ (- @var{x} @var{w}) @var{y}@dots{})
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
378 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
379 @end defun
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
380
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
381 Any argument whose name contains the name of a type (e.g.,
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
382 @var{integer}, @var{integer1} or @var{buffer}) is expected to be of that
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
383 type. A plural of a type (such as @var{buffers}) often means a list of
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
384 objects of that type. Arguments named @var{object} may be of any type.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
385 (@xref{Lisp Data Types}, for a list of Emacs object types.) Arguments
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
386 with other sorts of names (e.g., @var{new-file}) are discussed
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
387 specifically in the description of the function. In some sections,
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
388 features common to the arguments of several functions are described at
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
389 the beginning.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
390
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
391 @xref{Lambda Expressions}, for a more complete description of optional
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
392 and rest arguments.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
393
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
394 Command, macro, and special form descriptions have the same format,
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
395 but the word `Function' is replaced by `Command', `Macro', or `Special
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
396 Form', respectively. Commands are simply functions that may be called
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
397 interactively; macros process their arguments differently from functions
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
398 (the arguments are not evaluated), but are presented the same way.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
399
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
400 Special form descriptions use a more complex notation to specify
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
401 optional and repeated arguments because they can break the argument
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
402 list down into separate arguments in more complicated ways.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
403 @samp{@r{[}@var{optional-arg}@r{]}} means that @var{optional-arg} is
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
404 optional and @samp{@var{repeated-args}@dots{}} stands for zero or more
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
405 arguments. Parentheses are used when several arguments are grouped into
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
406 additional levels of list structure. Here is an example:
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
407
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
408 @defspec count-loop (@var{var} [@var{from} @var{to} [@var{inc}]]) @var{body}@dots{}
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
409 This imaginary special form implements a loop that executes the
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
410 @var{body} forms and then increments the variable @var{var} on each
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
411 iteration. On the first iteration, the variable has the value
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
412 @var{from}; on subsequent iterations, it is incremented by one (or by
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
413 @var{inc} if that is given). The loop exits before executing @var{body}
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
414 if @var{var} equals @var{to}. Here is an example:
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
415
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
416 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
417 (count-loop (i 0 10)
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
418 (prin1 i) (princ " ")
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
419 (prin1 (aref vector i))
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
420 (terpri))
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
421 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
422
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
423 If @var{from} and @var{to} are omitted, @var{var} is bound to
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
424 @code{nil} before the loop begins, and the loop exits if @var{var} is
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
425 non-@code{nil} at the beginning of an iteration. Here is an example:
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
426
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
427 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
428 (count-loop (done)
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
429 (if (pending)
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
430 (fixit)
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
431 (setq done t)))
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
432 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
433
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
434 In this special form, the arguments @var{from} and @var{to} are
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
435 optional, but must both be present or both absent. If they are present,
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
436 @var{inc} may optionally be specified as well. These arguments are
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
437 grouped with the argument @var{var} into a list, to distinguish them
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
438 from @var{body}, which includes all remaining elements of the form.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
439 @end defspec
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
440
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
441 @node A Sample Variable Description
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
442 @subsubsection A Sample Variable Description
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
443 @cindex variable descriptions
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
444 @cindex option descriptions
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
445
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
446 A @dfn{variable} is a name that can hold a value. Although nearly
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
447 all variables can be set by the user, certain variables exist
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
448 specifically so that users can change them; these are called @dfn{user
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
449 options}. Ordinary variables and user options are described using a
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
450 format like that for functions except that there are no arguments.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
451
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
452 Here is a description of the imaginary @code{electric-future-map}
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
453 variable.@refill
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
454
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
455 @defvar electric-future-map
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
456 The value of this variable is a full keymap used by Electric Command
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
457 Future mode. The functions in this map allow you to edit commands you
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
458 have not yet thought about executing.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
459 @end defvar
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
460
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
461 User option descriptions have the same format, but `Variable' is
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
462 replaced by `User Option'.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
463
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
464 @node Version Info
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
465 @section Version Information
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
466
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
467 These facilities provide information about which version of Emacs is
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
468 in use.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
469
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
470 @deffn Command emacs-version &optional here
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
471 This function returns a string describing the version of Emacs that is
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
472 running. It is useful to include this string in bug reports.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
473
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
474 @smallexample
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
475 @group
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
476 (emacs-version)
102163
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
477 @result{} "GNU Emacs 23.1 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
478 of 2009-06-01 on cyd.mit.edu"
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
479 @end group
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
480 @end smallexample
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
481
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
482 If @var{here} is non-@code{nil}, it inserts the text in the buffer
102163
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
483 before point, and returns @code{nil}. When this function is called
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
484 interactively, it prints the same information in the echo area, but
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
485 giving a prefix argument makes @var{here} non-@code{nil}.
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
486 @end deffn
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
487
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
488 @defvar emacs-build-time
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
489 The value of this variable indicates the time at which Emacs was built
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
490 at the local site. It is a list of three integers, like the value
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
491 of @code{current-time} (@pxref{Time of Day}).
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
492
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
493 @example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
494 @group
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
495 emacs-build-time
102163
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
496 @result{} (18846 52016 156039)
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
497 @end group
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
498 @end example
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
499 @end defvar
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
500
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
501 @defvar emacs-version
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
502 The value of this variable is the version of Emacs being run. It is a
102163
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
503 string such as @code{"23.1.1"}. The last number in this string is not
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
504 really part of the Emacs release version number; it is incremented
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
505 each time you build Emacs in any given directory. A value with four
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
506 numeric components, such as @code{"22.0.91.1"}, indicates an
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
507 unreleased test version.
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
508 @end defvar
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
509
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
510 The following two variables have existed since Emacs version 19.23:
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
511
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
512 @defvar emacs-major-version
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
513 The major version number of Emacs, as an integer. For Emacs version
102163
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
514 23.1, the value is 23.
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
515 @end defvar
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
516
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
517 @defvar emacs-minor-version
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
518 The minor version number of Emacs, as an integer. For Emacs version
102163
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
519 23.1, the value is 1.
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
520 @end defvar
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
521
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
522 @node Acknowledgements
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
523 @section Acknowledgements
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
524
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
525 This manual was written by Robert Krawitz, Bil Lewis, Dan LaLiberte,
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
526 Richard@tie{}M. Stallman and Chris Welty, the volunteers of the GNU
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
527 manual group, in an effort extending over several years.
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
528 Robert@tie{}J. Chassell helped to review and edit the manual, with the
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
529 support of the Defense Advanced Research Projects Agency, ARPA Order
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
530 6082, arranged by Warren@tie{}A. Hunt, Jr.@: of Computational Logic,
102163
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
531 Inc. Additional sections were written by Miles Bader, Lars Brinkhoff,
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
532 Chong Yidong, Kenichi Handa, Lute Kamstra, Juri Linkov, Glenn Morris,
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
533 Thien-Thi Nguyen, Dan Nicolaescu, Martin Rudalics, Kim F. Storm, Luc
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
534 Teirlinck, and Eli Zaretskii.
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
535
102163
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
536 Corrections were supplied by Drew Adams, Juanma Barranquero, Karl
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
537 Berry, Jim Blandy, Bard Bloom, Stephane Boucher, David Boyes, Alan
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
538 Carroll, Richard Davis, Lawrence R. Dodd, Peter Doornbosch, David
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
539 A. Duff, Chris Eich, Beverly Erlebacher, David Eckelkamp, Ralf Fassel,
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
540 Eirik Fuller, Stephen Gildea, Bob Glickstein, Eric Hanchrow, Jesper
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
541 Harder, George Hartzell, Nathan Hess, Masayuki Ida, Dan Jacobson, Jak
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
542 Kirman, Bob Knighten, Frederick M. Korz, Joe Lammens, Glenn M. Lewis,
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
543 K. Richard Magill, Brian Marick, Roland McGrath, Stefan Monnier, Skip
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
544 Montanaro, John Gardiner Myers, Thomas A. Peterson, Francesco Potorti,
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
545 Friedrich Pukelsheim, Arnold D. Robbins, Raul Rockwell, Jason Rumney,
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
546 Per Starb@"ack, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
547 Trost, Rickard Westman, Jean White, Eduard Wiebe, Matthew Wilding,
47ff541effb4 (Version Info): Update version numbers in examples.
Chong Yidong <cyd@stupidchicken.com>
parents: 100974
diff changeset
548 Carl Witty, Dale Worley, Rusty Wright, and David D. Zuhn.
84077
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
549
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
550 @ignore
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
551 arch-tag: d156593f-82f8-4708-a844-204e48f7f2aa
efcba214fdbb Move here from ../../lispref
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
552 @end ignore