; More doc improvements for OClosures

* doc/lispref/functions.texi (OClosures):
* doc/lispref/commands.texi (Using Interactive):
* etc/NEWS: Some more docs improvements for OClosures.
This commit is contained in:
Eli Zaretskii 2023-03-03 21:44:54 +02:00
parent 2840895c1a
commit 585faf4c17
3 changed files with 14 additions and 6 deletions

View file

@ -325,10 +325,10 @@ function @code{oclosure-interactive-form}.
@defun oclosure-interactive-form function @defun oclosure-interactive-form function
Just like @code{interactive-form}, this function takes a command and Just like @code{interactive-form}, this function takes a command and
returns its interactive form. The difference is that it is a generic returns its interactive form. The difference is that it is a generic
function and it is only called when @var{function} is an OClosure. function and it is only called when @var{function} is an OClosure
The purpose is to make it possible for some OClosure types to compute (@pxref{OClosures}). The purpose is to make it possible for some
their interactive forms dynamically instead of carrying it in one of OClosure types to compute their interactive forms dynamically instead
their slots. of carrying it in one of their slots.
This is used for example for @code{kmacro} functions in order to This is used for example for @code{kmacro} functions in order to
reduce their memory size, since they all share the same interactive reduce their memory size, since they all share the same interactive

View file

@ -1731,6 +1731,11 @@ This function returns the OClosure type (a symbol) of @var{object} if
it is an OClosure, and @code{nil} otherwise. it is an OClosure, and @code{nil} otherwise.
@end defun @end defun
One other function related to OClosures is
@code{oclosure-interactive-form}, which allows some types of OClosures
to compute their interactive forms dynamically. @xref{Using
Interactive, oclosure-interactive-form}.
@node Advising Functions @node Advising Functions
@section Advising Emacs Lisp Functions @section Advising Emacs Lisp Functions

View file

@ -3231,8 +3231,11 @@ manually if needed, using the new user options 'wallpaper-command' and
+++ +++
** New package 'oclosure'. ** New package 'oclosure'.
This allows the creation of "functions with slots" or "function This allows the creation of OClosures, which are "functions with
objects" via the macros 'oclosure-define' and 'oclosure-lambda'. slots" or "function objects" that expose additional information about
themselves. Use the new macros 'oclosure-define' and
'oclosure-lambda' to create OClosures. See the "(elisp) OClosures"
node for more information.
+++ +++
*** New generic function 'oclosure-interactive-form'. *** New generic function 'oclosure-interactive-form'.