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?

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.