Add/fix documentation for widget-apply

* doc/misc/widget.texi (Widget Properties): Document `widget-apply'.

* src/fns.c (Fwidget_apply): Document return value (used in many
places).
This commit is contained in:
Juanma Barranquero 2019-10-16 15:39:42 +02:00
parent b70f885d58
commit 4d65821bf0
2 changed files with 7 additions and 0 deletions

View file

@ -1446,6 +1446,12 @@ Non-@code{nil} if @var{widget} has a value (even @code{nil}) for
property @var{property}.
@end defun
@defun widget-apply widget property &rest args
Apply the value of @var{property} to @var{widget}, passing @var{args}
as additional arguments to the function. Return the result of that
function call.
@end defun
Occasionally it can be useful to know which kind of widget you have,
i.e., the name of the widget type you gave when the widget was created.

View file

@ -3093,6 +3093,7 @@ later with `widget-put'. */)
DEFUN ("widget-apply", Fwidget_apply, Swidget_apply, 2, MANY, 0,
doc: /* Apply the value of WIDGET's PROPERTY to the widget itself.
Return the result of applying the value of PROPERTY to WIDGET.
ARGS are passed as extra arguments to the function.
usage: (widget-apply WIDGET PROPERTY &rest ARGS) */)
(ptrdiff_t nargs, Lisp_Object *args)