diff options
| author | Eli Zaretskii | 2023-03-03 21:44:54 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-03-03 21:44:54 +0200 |
| commit | 585faf4c173bb9d0a0315dfcfe598d27f82d2bbf (patch) | |
| tree | ae28859df8279c81a48943df3cb43b13b5e37693 | |
| parent | 2840895c1ae4f60c3b225dc1d75854fb09bca259 (diff) | |
| download | emacs-585faf4c173bb9d0a0315dfcfe598d27f82d2bbf.tar.gz emacs-585faf4c173bb9d0a0315dfcfe598d27f82d2bbf.zip | |
; More doc improvements for OClosures
* doc/lispref/functions.texi (OClosures):
* doc/lispref/commands.texi (Using Interactive):
* etc/NEWS: Some more docs improvements for OClosures.
| -rw-r--r-- | doc/lispref/commands.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/functions.texi | 5 | ||||
| -rw-r--r-- | etc/NEWS | 7 |
3 files changed, 14 insertions, 6 deletions
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 6fd9377e1de..20be706bebd 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -325,10 +325,10 @@ function @code{oclosure-interactive-form}. | |||
| 325 | @defun oclosure-interactive-form function | 325 | @defun oclosure-interactive-form function |
| 326 | Just like @code{interactive-form}, this function takes a command and | 326 | Just like @code{interactive-form}, this function takes a command and |
| 327 | returns its interactive form. The difference is that it is a generic | 327 | returns its interactive form. The difference is that it is a generic |
| 328 | function and it is only called when @var{function} is an OClosure. | 328 | function and it is only called when @var{function} is an OClosure |
| 329 | The purpose is to make it possible for some OClosure types to compute | 329 | (@pxref{OClosures}). The purpose is to make it possible for some |
| 330 | their interactive forms dynamically instead of carrying it in one of | 330 | OClosure types to compute their interactive forms dynamically instead |
| 331 | their slots. | 331 | of carrying it in one of their slots. |
| 332 | 332 | ||
| 333 | This is used for example for @code{kmacro} functions in order to | 333 | This is used for example for @code{kmacro} functions in order to |
| 334 | reduce their memory size, since they all share the same interactive | 334 | reduce their memory size, since they all share the same interactive |
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index d1459404375..d38f6ef38bc 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi | |||
| @@ -1731,6 +1731,11 @@ This function returns the OClosure type (a symbol) of @var{object} if | |||
| 1731 | it is an OClosure, and @code{nil} otherwise. | 1731 | it is an OClosure, and @code{nil} otherwise. |
| 1732 | @end defun | 1732 | @end defun |
| 1733 | 1733 | ||
| 1734 | One other function related to OClosures is | ||
| 1735 | @code{oclosure-interactive-form}, which allows some types of OClosures | ||
| 1736 | to compute their interactive forms dynamically. @xref{Using | ||
| 1737 | Interactive, oclosure-interactive-form}. | ||
| 1738 | |||
| 1734 | 1739 | ||
| 1735 | @node Advising Functions | 1740 | @node Advising Functions |
| 1736 | @section Advising Emacs Lisp Functions | 1741 | @section Advising Emacs Lisp Functions |
| @@ -3231,8 +3231,11 @@ manually if needed, using the new user options 'wallpaper-command' and | |||
| 3231 | 3231 | ||
| 3232 | +++ | 3232 | +++ |
| 3233 | ** New package 'oclosure'. | 3233 | ** New package 'oclosure'. |
| 3234 | This allows the creation of "functions with slots" or "function | 3234 | This allows the creation of OClosures, which are "functions with |
| 3235 | objects" via the macros 'oclosure-define' and 'oclosure-lambda'. | 3235 | slots" or "function objects" that expose additional information about |
| 3236 | themselves. Use the new macros 'oclosure-define' and | ||
| 3237 | 'oclosure-lambda' to create OClosures. See the "(elisp) OClosures" | ||
| 3238 | node for more information. | ||
| 3236 | 3239 | ||
| 3237 | +++ | 3240 | +++ |
| 3238 | *** New generic function 'oclosure-interactive-form'. | 3241 | *** New generic function 'oclosure-interactive-form'. |