From: Juanma Barranquero Date: Wed, 16 Oct 2019 13:39:42 +0000 (+0200) Subject: Add/fix documentation for widget-apply X-Git-Tag: emacs-27.0.90~1030 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4d65821bf016dff6a8b10578913970f854763346;p=emacs.git 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). --- diff --git a/doc/misc/widget.texi b/doc/misc/widget.texi index 6d94768644f..c1127a466a7 100644 --- a/doc/misc/widget.texi +++ b/doc/misc/widget.texi @@ -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. diff --git a/src/fns.c b/src/fns.c index fc1abe8b18a..cbb6879223d 100644 --- a/src/fns.c +++ b/src/fns.c @@ -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)