emacs: demystifying emacs buttons

1 · Shane Mulligan · Oct. 3, 2019, 11 a.m.
Buttons in emacs are a little bit of a black box. This makes it difficult wish to extend or modify a mode that uses buttons: yasnippet, for example. Here is how to find out what the button does before you click on it. Get the function This is all you need for most cases. (defun get-button-action () "Get the action of the button at point" (interactive) (let ((b (button-at (point)))) (if b (button-get b 'action)))) Special case: help-mode and yasnippet Applying (get-button-action) in yasnippet ver...