aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/misc/ChangeLog8
-rw-r--r--doc/misc/eieio.texi98
2 files changed, 38 insertions, 68 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 3866b2dc7a8..c0a47b4db8d 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,11 @@
12014-01-22 David Engster <deng@randomsample.de>
2
3 * eieio.texi (Introduction): Move introductory paragraph about
4 EIEIO and CLOS from 'Building Classes' to here.
5 (Documentation): Remove, since eieio-doc is not part of Emacs.
6 (Class Values, CLOS compatibility): Mention that
7 `describe-function' will also give information about classes.
8
12014-01-20 Paul Eggert <eggert@cs.ucla.edu> 92014-01-20 Paul Eggert <eggert@cs.ucla.edu>
2 10
3 * texinfo.tex: Update from gnulib. 11 * texinfo.tex: Update from gnulib.
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi
index 427c10c160e..370d18cc567 100644
--- a/doc/misc/eieio.texi
+++ b/doc/misc/eieio.texi
@@ -72,7 +72,6 @@ framework for writing object-oriented applications in Emacs.
72* Base Classes:: Additional classes you can inherit from. 72* Base Classes:: Additional classes you can inherit from.
73* Browsing:: Browsing your class lists. 73* Browsing:: Browsing your class lists.
74* Class Values:: Displaying information about a class or object. 74* Class Values:: Displaying information about a class or object.
75* Documentation:: Automatically creating texinfo documentation.
76* Default Superclass:: The root superclasses. 75* Default Superclass:: The root superclasses.
77* Signals:: When you make errors. 76* Signals:: When you make errors.
78* Naming Conventions:: Name your objects in an Emacs friendly way. 77* Naming Conventions:: Name your objects in an Emacs friendly way.
@@ -177,9 +176,17 @@ error. @ref{Signals}.
177@node Introduction 176@node Introduction
178@chapter Introduction 177@chapter Introduction
179 178
180Due to restrictions in the Emacs Lisp language, CLOS cannot be 179First off, please note that this manual cannot serve as a complete
181completely supported, and a few functions have been added in place of 180introduction to object oriented programming and generic functions in
182setf. 181LISP. Although EIEIO is not a complete implementation of the Common
182Lisp Object System (CLOS) and also differs from it in several aspects,
183it follows the same basic concepts. Therefore, it is highly
184recommended to learn those from a textbook or tutorial first,
185especially if you only know OOP from languages like C++ or Java. If
186on the other hand you are already familiar with CLOS, you should be
187aware that @eieio{} does not implement the full CLOS specification and
188also differs in some other aspects (@xref{Introduction}, and @ref{CLOS
189compatibility}).
183 190
184@eieio{} supports the following features: 191@eieio{} supports the following features:
185 192
@@ -211,7 +218,10 @@ Public and private classifications for slots (extensions to CLOS)
211Customization support in a class (extension to CLOS) 218Customization support in a class (extension to CLOS)
212@end enumerate 219@end enumerate
213 220
214Here are some important CLOS features that @eieio{} presently lacks: 221Due to restrictions in the Emacs Lisp language, CLOS cannot be
222completely supported, and a few functions have been added in place of
223setf. Here are some important CLOS features that @eieio{} presently
224lacks:
215 225
216@table @asis 226@table @asis
217 227
@@ -247,17 +257,6 @@ should use a deep copy but currently does not.
247@node Building Classes 257@node Building Classes
248@chapter Building Classes 258@chapter Building Classes
249 259
250First off, please note that this manual cannot serve as a complete
251introduction to object oriented programming and generic functions in
252LISP. Although EIEIO is not a complete CLOS implementation and also
253differs from CLOS in several aspects, it follows the same basic
254concepts. Therefore, it is highly recommended to learn these from a
255textbook or tutorial first, especially if you only know OOP from
256languages like C++ or Java. If on the other hand you are already
257familiar with CLOS, you should be aware that @eieio{} does not implement
258the full CLOS specification and also differs in some other aspects
259(@xref{Introduction}, and @ref{CLOS compatibility}).
260
261A @dfn{class} is a definition for organizing data and methods 260A @dfn{class} is a definition for organizing data and methods
262together. An @eieio{} class has structures similar to the classes 261together. An @eieio{} class has structures similar to the classes
263found in other object-oriented (OO) languages. 262found in other object-oriented (OO) languages.
@@ -1546,55 +1545,18 @@ comes out upside-down.
1546@chapter Class Values 1545@chapter Class Values
1547 1546
1548Details about any class or object can be retrieved using the function 1547Details about any class or object can be retrieved using the function
1549@code{eieio-describe-class}. Interactively, type in the name of 1548@code{eieio-describe-class}. Interactively, type in the name of a
1550a class. In a program, pass it a string with the name of a class, a 1549class. In a program, pass it a string with the name of a class, a
1551class symbol, or an object. The resulting buffer will display all slot 1550class symbol, or an object. The resulting buffer will display all
1552names. 1551slot names. Additionally, all methods defined to have functionality
1553 1552on this class is displayed.
1554Additionally, all methods defined to have functionality on this class is 1553
1555displayed. 1554You can also use the normal @code{describe-function} to retrieve
1556 1555information about a class. If you call it on a constructor function,
1557@node Documentation 1556it will also display the class information. If you call it on a
1558@chapter Documentation 1557generic function, all implementations of that generic function will be
1559 1558listet, together with links through which you can directly jump to the
1560It is possible to automatically create documentation for your classes in 1559source.
1561texinfo format by using the tools in the file @file{eieio-doc.el}
1562
1563@deffn Command eieiodoc-class class indexstring &optional skiplist
1564
1565This will start at the current point, and create an indented menu of
1566all the child classes of, and including @var{class}, but skipping any
1567classes that might be in @var{skiplist}. It will then create nodes for
1568all these classes, subsection headings, and indexes.
1569
1570Each class will be indexed using the texinfo labeled index
1571@var{indexstring} which is a two letter description.
1572@xref{New Indices,,,texinfo,Texinfo manual}.
1573
1574To use this command, the texinfo macro
1575
1576@example
1577@@defindex @@var @{ indexstring @}
1578@end example
1579
1580@noindent
1581where @var{indexstring} is replaced with the two letter code.
1582
1583Next, an inheritance tree will be created listing all parents of that
1584section's class.
1585
1586Then, all the slots will be expanded in tables, and described
1587using the documentation strings from the code. Default values will also
1588be displayed. Only those slots with @code{:initarg} specified will be
1589expanded, others will be hidden. If a slot is inherited from a parent,
1590that slot will also be skipped unless the default value is different.
1591If there is a change, then the documentation part of the slot will be
1592replace with an @@xref back to the parent.
1593
1594This command can only display documentation for classes whose
1595definitions have been loaded in this Emacs session.
1596
1597@end deffn
1598 1560
1599@node Default Superclass 1561@node Default Superclass
1600@chapter Default Superclass 1562@chapter Default Superclass
@@ -1903,9 +1865,9 @@ work.
1903@end table 1865@end table
1904 1866
1905CLOS supports the @code{describe} command, but @eieio{} only provides 1867CLOS supports the @code{describe} command, but @eieio{} only provides
1906@code{eieio-describe-class}, and @code{eieio-describe-generic}. These 1868@code{eieio-describe-class}, and @code{eieio-describe-generic}. Those
1907functions are adviced into @code{describe-variable}, and 1869are automatically called by @code{describe-function} when called on a
1908@code{describe-function}. 1870constructor or generic function.
1909 1871
1910When creating a new class (@pxref{Building Classes}) there are several 1872When creating a new class (@pxref{Building Classes}) there are several
1911new keywords supported by @eieio{}. 1873new keywords supported by @eieio{}.