Q:

Get widget at point

For example, I inserted many link widgets like this:
(widget-create `(link :tag "Test link"
                      :button-prefix ""
                      :button-suffix ""
                      :button-face nil
                      :format "%[%t\n%]"
                      :help-echo ""
                      :action nil
                      'test))

Later I want to retrieve a specific link widget at point to modify some of its values, is it possible?

A:

I found the answer:
(get-char-property (point) 'button)

And I will get the widget of type 'button at point. link is also a widget of 'button type.

