Minor improvements to EDE and EIEIO manuals
For discussion, see the following threads: https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg00630.html https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00099.html * doc/misc/ede.texi (ede-generic-project): Clean up example. * doc/misc/eieio.texi (Accessing Slots): Document slot-value as a generalized variable and set-slot-value as obsolete. (Predicates): Fix typo. (Introspection): Document eieio-class-slots in place of the obsolete object-slots.
This commit is contained in:
parent
3916e63f9e
commit
d8593fd19f
2 changed files with 16 additions and 11 deletions
|
@ -955,18 +955,16 @@ The example for Makefiles looks like this:
|
||||||
;;; MAKEFILE
|
;;; MAKEFILE
|
||||||
|
|
||||||
(defclass ede-generic-makefile-project (ede-generic-project)
|
(defclass ede-generic-makefile-project (ede-generic-project)
|
||||||
((buildfile :initform "Makefile")
|
((buildfile :initform "Makefile"))
|
||||||
)
|
|
||||||
"Generic Project for makefiles.")
|
"Generic Project for makefiles.")
|
||||||
|
|
||||||
(defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config)
|
(defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config)
|
||||||
"Setup a configuration for Make."
|
"Set up a configuration for Make."
|
||||||
(oset config build-command "make -k")
|
(oset config build-command "make -k")
|
||||||
(oset config debug-command "gdb ")
|
(oset config debug-command "gdb "))
|
||||||
)
|
|
||||||
|
|
||||||
(ede-generic-new-autoloader "generic-makefile" "Make"
|
(ede-generic-new-autoloader "generic-makefile" "Make"
|
||||||
"Makefile" 'ede-generic-makefile-project)
|
"Makefile" 'ede-generic-makefile-project)
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
This example project will detect any directory with the file
|
This example project will detect any directory with the file
|
||||||
|
|
|
@ -734,14 +734,21 @@ slot values, and use the previously mentioned set/ref routines.
|
||||||
@anchor{slot-value}
|
@anchor{slot-value}
|
||||||
This function retrieves the value of @var{slot} from @var{object}.
|
This function retrieves the value of @var{slot} from @var{object}.
|
||||||
Unlike @code{oref}, the symbol for @var{slot} must be quoted.
|
Unlike @code{oref}, the symbol for @var{slot} must be quoted.
|
||||||
|
|
||||||
|
This is a generalized variable that can be used with @code{setf} to
|
||||||
|
modify the value stored in @var{slot}. @xref{Generalized
|
||||||
|
Variables,,,elisp,GNU Emacs Lisp Reference Manual}.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defun set-slot-value object slot value
|
@defun set-slot-value object slot value
|
||||||
@anchor{set-slot-value}
|
@anchor{set-slot-value}
|
||||||
This is not a CLOS function, but is the setter for @code{slot-value}
|
This function sets the value of @var{slot} from @var{object}. Unlike
|
||||||
used by the @code{setf} macro. This
|
|
||||||
function sets the value of @var{slot} from @var{object}. Unlike
|
|
||||||
@code{oset}, the symbol for @var{slot} must be quoted.
|
@code{oset}, the symbol for @var{slot} must be quoted.
|
||||||
|
|
||||||
|
This is not a CLOS function, but is the obsolete setter for
|
||||||
|
@code{slot-value} used by the @code{setf} macro. It is therefore
|
||||||
|
recommended to use @w{@code{(setf (slot-value @var{object} @var{slot})
|
||||||
|
@var{value})}} instead.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defun slot-makeunbound object slot
|
@defun slot-makeunbound object slot
|
||||||
|
@ -1062,7 +1069,7 @@ Return a string of the form @samp{#<object-class myobjname>} for @var{obj}.
|
||||||
This should look like Lisp symbols from other parts of Emacs such as
|
This should look like Lisp symbols from other parts of Emacs such as
|
||||||
buffers and processes, and is shorter and cleaner than printing the
|
buffers and processes, and is shorter and cleaner than printing the
|
||||||
object's record. It is more useful to use @code{object-print} to get
|
object's record. It is more useful to use @code{object-print} to get
|
||||||
and object's print form, as this allows the object to add extra display
|
an object's print form, as this allows the object to add extra display
|
||||||
information into the symbol.
|
information into the symbol.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
|
@ -1217,7 +1224,7 @@ objects on top of records, and thus everything is technically visible,
|
||||||
some functions have been provided. None of these functions are a part
|
some functions have been provided. None of these functions are a part
|
||||||
of CLOS.
|
of CLOS.
|
||||||
|
|
||||||
@defun object-slots obj
|
@defun eieio-class-slots obj
|
||||||
Return the list of public slots for @var{obj}.
|
Return the list of public slots for @var{obj}.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue