2

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?

Tu Do
  • 6,772
  • 20
  • 39

1 Answers1

2

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.

Tu Do
  • 6,772
  • 20
  • 39