diff options
| author | Juanma Barranquero | 2009-10-09 02:58:57 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2009-10-09 02:58:57 +0000 |
| commit | 310dbb050f266b8542adef11484924e6f619b23c (patch) | |
| tree | 2850a1dc364921b4cd51dc8e5aabe42eb0dbff79 /doc | |
| parent | 4f54db4b41893b613d7707e6bb64ccecafe3c91d (diff) | |
| download | emacs-310dbb050f266b8542adef11484924e6f619b23c.tar.gz emacs-310dbb050f266b8542adef11484924e6f619b23c.zip | |
* eieio.texi: Fix typos.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/ChangeLog | 4 | ||||
| -rwxr-xr-x | doc/misc/eieio.texi | 56 |
2 files changed, 32 insertions, 28 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 703319269d2..004cafa691d 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-10-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * eieio.texi: Fix typos. | ||
| 4 | |||
| 1 | 2009-10-07 Chong Yidong <cyd@stupidchicken.com> | 5 | 2009-10-07 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | * cl.texi (Argument Lists): Clarify explicit keyword arguments. | 7 | * cl.texi (Argument Lists): Clarify explicit keyword arguments. |
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index 1bb38dfa1e5..d833eb1e0ab 100755 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi | |||
| @@ -172,7 +172,7 @@ In these examples, @eieio{} automatically examines the class of | |||
| 172 | @code{rec}, and ensures that the method defined above is called. If | 172 | @code{rec}, and ensures that the method defined above is called. If |
| 173 | @code{rec} is some other class lacking a @code{call-record} method, or | 173 | @code{rec} is some other class lacking a @code{call-record} method, or |
| 174 | some other data type, Emacs signals a @code{no-method-definition} | 174 | some other data type, Emacs signals a @code{no-method-definition} |
| 175 | error. @ref{Signals}. | 175 | error. @ref{Signals}. |
| 176 | 176 | ||
| 177 | @node Introduction | 177 | @node Introduction |
| 178 | @comment node-name, next, previous, up | 178 | @comment node-name, next, previous, up |
| @@ -469,7 +469,7 @@ will not be evaluated at instantiation time, and the value in this | |||
| 469 | slot will instead be @code{(lambda () some-variablename)}. | 469 | slot will instead be @code{(lambda () some-variablename)}. |
| 470 | 470 | ||
| 471 | After a class has been created with @code{defclass}, you can change | 471 | After a class has been created with @code{defclass}, you can change |
| 472 | that default value with @code{oset-default}. @ref{Accessing Slots}. | 472 | that default value with @code{oset-default}. @ref{Accessing Slots}. |
| 473 | 473 | ||
| 474 | @item :type | 474 | @item :type |
| 475 | An unquoted type specifier used to validate data set into this slot. | 475 | An unquoted type specifier used to validate data set into this slot. |
| @@ -542,11 +542,11 @@ This options is specific to Emacs, and is not in the CLOS spec. | |||
| 542 | 542 | ||
| 543 | @item :printer | 543 | @item :printer |
| 544 | This routine takes a symbol which is a function name. The function | 544 | This routine takes a symbol which is a function name. The function |
| 545 | should accept one argument. The a rgument is the value from the slot | 545 | should accept one argument. The argument is the value from the slot |
| 546 | to be printed. The function in @code{object-write} will write the | 546 | to be printed. The function in @code{object-write} will write the |
| 547 | slot value out to a printable form on @code{standard-output}. | 547 | slot value out to a printable form on @code{standard-output}. |
| 548 | 548 | ||
| 549 | The output format MUST be something that could in turn be interpreted | 549 | The output format MUST be something that could in turn be interpreted |
| 550 | with @code{read} such that the object can be brought back in from the | 550 | with @code{read} such that the object can be brought back in from the |
| 551 | output stream. Thus, if you wanted to output a symbol, you would need | 551 | output stream. Thus, if you wanted to output a symbol, you would need |
| 552 | to quote the symbol. If you wanted to run a function on load, you | 552 | to quote the symbol. If you wanted to run a function on load, you |
| @@ -682,7 +682,7 @@ Example of creating an object from a class: | |||
| 682 | 682 | ||
| 683 | @end defun | 683 | @end defun |
| 684 | 684 | ||
| 685 | To create an object from a class symbol, use use @code{make-instance}. | 685 | To create an object from a class symbol, use @code{make-instance}. |
| 686 | 686 | ||
| 687 | @defun make-instance class &rest initargs | 687 | @defun make-instance class &rest initargs |
| 688 | @anchor{make-instance} | 688 | @anchor{make-instance} |
| @@ -700,7 +700,7 @@ for each slot. For example: | |||
| 700 | (make-instance @code{'foo} @code{:slot1} value1 @code{:slotN} valueN) | 700 | (make-instance @code{'foo} @code{:slot1} value1 @code{:slotN} valueN) |
| 701 | @end example | 701 | @end example |
| 702 | 702 | ||
| 703 | Compatability note: | 703 | Compatibility note: |
| 704 | 704 | ||
| 705 | If the first element of @var{initargs} is a string, it is used as the | 705 | If the first element of @var{initargs} is a string, it is used as the |
| 706 | name of the class. | 706 | name of the class. |
| @@ -730,7 +730,7 @@ This macro sets the @code{:initform} for @var{slot} in @var{class} to | |||
| 730 | @var{value}. | 730 | @var{value}. |
| 731 | 731 | ||
| 732 | This allows the user to set both public and private defaults after the | 732 | This allows the user to set both public and private defaults after the |
| 733 | class has been constructed, and provides a way to to configure the | 733 | class has been constructed, and provides a way to configure the |
| 734 | default behavior of packages built with classes (the same way | 734 | default behavior of packages built with classes (the same way |
| 735 | @code{setq-default} does for buffer-local variables). | 735 | @code{setq-default} does for buffer-local variables). |
| 736 | 736 | ||
| @@ -817,7 +817,7 @@ slot. | |||
| 817 | @end example | 817 | @end example |
| 818 | 818 | ||
| 819 | Where each @var{var} is the local variable given to the associated | 819 | Where each @var{var} is the local variable given to the associated |
| 820 | @var{slot}. A Slot specified without a variable name is given a | 820 | @var{slot}. A slot specified without a variable name is given a |
| 821 | variable name of the same name as the slot. | 821 | variable name of the same name as the slot. |
| 822 | 822 | ||
| 823 | @example | 823 | @example |
| @@ -1070,13 +1070,13 @@ Will fetch the documentation string for @code{eieio-default-superclass}. | |||
| 1070 | @defun class-constructor class | 1070 | @defun class-constructor class |
| 1071 | Return a symbol used as a constructor for @var{class}. The | 1071 | Return a symbol used as a constructor for @var{class}. The |
| 1072 | constructor is a function used to create new instances of | 1072 | constructor is a function used to create new instances of |
| 1073 | @var{CLASS}. This function provides a way to make an object of a class | 1073 | @var{CLASS}. This function provides a way to make an object of a class |
| 1074 | without knowing what it is. This is not a part of CLOS. | 1074 | without knowing what it is. This is not a part of CLOS. |
| 1075 | @end defun | 1075 | @end defun |
| 1076 | 1076 | ||
| 1077 | @defun object-name obj | 1077 | @defun object-name obj |
| 1078 | Return a string of the form @samp{#<object-class myobjname>} for @var{obj}. | 1078 | Return a string of the form @samp{#<object-class myobjname>} for @var{obj}. |
| 1079 | This should look like Lisp symbols from other parts of emacs such as | 1079 | This should look like Lisp symbols from other parts of Emacs such as |
| 1080 | buffers and processes, and is shorter and cleaner than printing the | 1080 | buffers and processes, and is shorter and cleaner than printing the |
| 1081 | object's vector. It is more useful to use @code{object-print} to get | 1081 | object's vector. It is more useful to use @code{object-print} to get |
| 1082 | and object's print form, as this allows the object to add extra display | 1082 | and object's print form, as this allows the object to add extra display |
| @@ -1155,7 +1155,7 @@ to manage association lists of @eieio{} objects: | |||
| 1155 | @defun object-assoc key slot list | 1155 | @defun object-assoc key slot list |
| 1156 | @anchor{object-assoc} | 1156 | @anchor{object-assoc} |
| 1157 | Return an object if @var{key} is @dfn{equal} to SLOT's value of an object in @var{list}. | 1157 | Return an object if @var{key} is @dfn{equal} to SLOT's value of an object in @var{list}. |
| 1158 | @var{list} is a list of objects who's slots are searched. | 1158 | @var{list} is a list of objects whose slots are searched. |
| 1159 | Objects in @var{list} do not need to have a slot named @var{slot}, nor does | 1159 | Objects in @var{list} do not need to have a slot named @var{slot}, nor does |
| 1160 | @var{slot} need to be bound. If these errors occur, those objects will | 1160 | @var{slot} need to be bound. If these errors occur, those objects will |
| 1161 | be ignored. | 1161 | be ignored. |
| @@ -1309,7 +1309,7 @@ The @code{eieio-instance-inheritor} class works by causing cloned | |||
| 1309 | objects to have all slots unbound. This class' @code{slot-unbound} | 1309 | objects to have all slots unbound. This class' @code{slot-unbound} |
| 1310 | method will cause references to unbound slots to be redirected to the | 1310 | method will cause references to unbound slots to be redirected to the |
| 1311 | parent instance. If the parent slot is also unbound, then | 1311 | parent instance. If the parent slot is also unbound, then |
| 1312 | @code{slot-unbound} will signal an an error named @code{slot-unbound}. | 1312 | @code{slot-unbound} will signal an error named @code{slot-unbound}. |
| 1313 | 1313 | ||
| 1314 | @node eieio-instance-tracker | 1314 | @node eieio-instance-tracker |
| 1315 | @section @code{eieio-instance-tracker} | 1315 | @section @code{eieio-instance-tracker} |
| @@ -1342,7 +1342,7 @@ This may let the garbage collector nab this instance. | |||
| 1342 | This convenience function lets you find instances. @var{key} is the | 1342 | This convenience function lets you find instances. @var{key} is the |
| 1343 | value to search for. @var{slot} is the slot to compare @var{KEY} | 1343 | value to search for. @var{slot} is the slot to compare @var{KEY} |
| 1344 | against. The function @code{equal} is used for comparison. | 1344 | against. The function @code{equal} is used for comparison. |
| 1345 | The paramter @var{list-symbol} is the variable symbol which contains the | 1345 | The parameter @var{list-symbol} is the variable symbol which contains the |
| 1346 | list of objects to be searched. | 1346 | list of objects to be searched. |
| 1347 | @end deffn | 1347 | @end deffn |
| 1348 | 1348 | ||
| @@ -1426,7 +1426,7 @@ access to it. | |||
| 1426 | This class is in package @file{eieio-speedbar}. | 1426 | This class is in package @file{eieio-speedbar}. |
| 1427 | 1427 | ||
| 1428 | If a series of class instances map to a tree structure, it is possible | 1428 | If a series of class instances map to a tree structure, it is possible |
| 1429 | to cause your classes to be displayable in Speedbar. @xref{Top,,,speedbar}. | 1429 | to cause your classes to be displayable in Speedbar. @xref{Top,,,speedbar}. |
| 1430 | Inheriting from these classes will enable a speedbar major display mode | 1430 | Inheriting from these classes will enable a speedbar major display mode |
| 1431 | with a minimum of effort. | 1431 | with a minimum of effort. |
| 1432 | 1432 | ||
| @@ -1519,7 +1519,7 @@ on how speedbar modes work | |||
| 1519 | @chapter Browsing class trees | 1519 | @chapter Browsing class trees |
| 1520 | 1520 | ||
| 1521 | The command @kbd{M-x eieio-browse} displays a buffer listing all the | 1521 | The command @kbd{M-x eieio-browse} displays a buffer listing all the |
| 1522 | currently loaded classes in emacs. The classes are listed in an | 1522 | currently loaded classes in Emacs. The classes are listed in an |
| 1523 | indented tree structure, starting from @code{eieio-default-superclass} | 1523 | indented tree structure, starting from @code{eieio-default-superclass} |
| 1524 | (@pxref{Default Superclass}). | 1524 | (@pxref{Default Superclass}). |
| 1525 | 1525 | ||
| @@ -1542,19 +1542,19 @@ comes out upside-down. | |||
| 1542 | @chapter Class Values | 1542 | @chapter Class Values |
| 1543 | 1543 | ||
| 1544 | Details about any class or object can be retrieved using the function | 1544 | Details about any class or object can be retrieved using the function |
| 1545 | @code{eieio-describe-class} function. Interactively, type in the name of | 1545 | @code{eieio-describe-class}. Interactively, type in the name of |
| 1546 | a class. In a program, pass it a string with the name of a class, a | 1546 | a class. In a program, pass it a string with the name of a class, a |
| 1547 | class symbol, or an object. The resulting buffer will display all slot | 1547 | class symbol, or an object. The resulting buffer will display all slot |
| 1548 | names. | 1548 | names. |
| 1549 | 1549 | ||
| 1550 | Additionally, all methods defined to have functionality on this class is | 1550 | Additionally, all methods defined to have functionality on this class |
| 1551 | displayed. | 1551 | are displayed. |
| 1552 | 1552 | ||
| 1553 | @node Default Superclass | 1553 | @node Default Superclass |
| 1554 | @comment node-name, next, previous, up | 1554 | @comment node-name, next, previous, up |
| 1555 | @chapter Default Superclass | 1555 | @chapter Default Superclass |
| 1556 | 1556 | ||
| 1557 | All defined classes, if created with no specified parent class) will | 1557 | All defined classes, if created with no specified parent class, will |
| 1558 | inherit from a special class stored in | 1558 | inherit from a special class stored in |
| 1559 | @code{eieio-default-superclass}. This superclass is quite simple, but | 1559 | @code{eieio-default-superclass}. This superclass is quite simple, but |
| 1560 | with it, certain default methods or attributes can be added to all | 1560 | with it, certain default methods or attributes can be added to all |
| @@ -1615,7 +1615,7 @@ This is called from the default @code{constructor}. | |||
| 1615 | @node Basic Methods | 1615 | @node Basic Methods |
| 1616 | @section Basic Methods | 1616 | @section Basic Methods |
| 1617 | 1617 | ||
| 1618 | Additional useful methods defined on the base sublcass are: | 1618 | Additional useful methods defined on the base subclass are: |
| 1619 | 1619 | ||
| 1620 | @defun clone obj &rest params | 1620 | @defun clone obj &rest params |
| 1621 | @anchor{clone} | 1621 | @anchor{clone} |
| @@ -1650,7 +1650,7 @@ to prepend a space. | |||
| 1650 | (cons (format " value: %s" (render this)) strings))) | 1650 | (cons (format " value: %s" (render this)) strings))) |
| 1651 | @end example | 1651 | @end example |
| 1652 | 1652 | ||
| 1653 | here is what some output could look like: | 1653 | Here is what some output could look like: |
| 1654 | @example | 1654 | @example |
| 1655 | (object-print test-object) | 1655 | (object-print test-object) |
| 1656 | => #<data-object test-object value: 3> | 1656 | => #<data-object test-object value: 3> |
| @@ -1674,7 +1674,7 @@ By implementing one of these methods for a class, you can change the | |||
| 1674 | behavior that occurs during one of these error cases, or even ignore | 1674 | behavior that occurs during one of these error cases, or even ignore |
| 1675 | the error by providing some behavior. | 1675 | the error by providing some behavior. |
| 1676 | 1676 | ||
| 1677 | @defun slot-missing ab &rest foo | 1677 | @defun slot-missing object slot-name operation &optional new-value |
| 1678 | @anchor{slot-missing} | 1678 | @anchor{slot-missing} |
| 1679 | Method invoked when an attempt to access a slot in @var{object} fails. | 1679 | Method invoked when an attempt to access a slot in @var{object} fails. |
| 1680 | @var{slot-name} is the name of the failed slot, @var{operation} is the type of access | 1680 | @var{slot-name} is the name of the failed slot, @var{operation} is the type of access |
| @@ -1721,9 +1721,9 @@ value becomes the return value of the original method call. | |||
| 1721 | @anchor{no-next-method} | 1721 | @anchor{no-next-method} |
| 1722 | Called from @dfn{call-next-method} when no additional methods are available. | 1722 | Called from @dfn{call-next-method} when no additional methods are available. |
| 1723 | @var{object} is othe object being called on @dfn{call-next-method}. | 1723 | @var{object} is othe object being called on @dfn{call-next-method}. |
| 1724 | @var{args} are the arguments it is called by. | 1724 | @var{args} are the arguments it is called by. |
| 1725 | This method signals @dfn{no-next-method} by default. Override this | 1725 | This method signals @dfn{no-next-method} by default. Override this |
| 1726 | method to not throw an error, and it's return value becomes the | 1726 | method to not throw an error, and its return value becomes the |
| 1727 | return value of @dfn{call-next-method}. | 1727 | return value of @dfn{call-next-method}. |
| 1728 | @end defun | 1728 | @end defun |
| 1729 | 1729 | ||
| @@ -1826,7 +1826,7 @@ instead pre-builds a method that gets the slot's value. | |||
| 1826 | 1826 | ||
| 1827 | @item :type | 1827 | @item :type |
| 1828 | Specifier uses the @code{typep} function from the @file{cl} | 1828 | Specifier uses the @code{typep} function from the @file{cl} |
| 1829 | package. @xref{(cl)Type Predicates}. It therefore has the same issues as | 1829 | package. @xref{(cl)Type Predicates}. It therefore has the same issues as |
| 1830 | that package. Extensions include the ability to provide object names. | 1830 | that package. Extensions include the ability to provide object names. |
| 1831 | @end table | 1831 | @end table |
| 1832 | 1832 | ||
| @@ -1846,7 +1846,7 @@ except @code{:around}. | |||
| 1846 | Calls defgeneric, and accepts most of the expected arguments. Only | 1846 | Calls defgeneric, and accepts most of the expected arguments. Only |
| 1847 | the first argument to the created method may have a type specifier. | 1847 | the first argument to the created method may have a type specifier. |
| 1848 | To type cast against a class, the class must exist before defmethod is | 1848 | To type cast against a class, the class must exist before defmethod is |
| 1849 | called. In addition, the @code{:around} tag is not supported. | 1849 | called. In addition, the @code{:around} tag is not supported. |
| 1850 | 1850 | ||
| 1851 | @item call-next-method | 1851 | @item call-next-method |
| 1852 | Inside a method, calls the next available method up the inheritance tree | 1852 | Inside a method, calls the next available method up the inheritance tree |
| @@ -1874,10 +1874,10 @@ In @eieio{} tags are in lower case, not mixed case. | |||
| 1874 | @chapter Wish List | 1874 | @chapter Wish List |
| 1875 | 1875 | ||
| 1876 | @eieio{} is an incomplete implementation of CLOS. Finding ways to | 1876 | @eieio{} is an incomplete implementation of CLOS. Finding ways to |
| 1877 | improve the compatability would help make CLOS style programs run | 1877 | improve the compatibility would help make CLOS style programs run |
| 1878 | better in Emacs. | 1878 | better in Emacs. |
| 1879 | 1879 | ||
| 1880 | Some important compatability features that would be good to add are: | 1880 | Some important compatibility features that would be good to add are: |
| 1881 | 1881 | ||
| 1882 | @enumerate | 1882 | @enumerate |
| 1883 | @item | 1883 | @item |