From ed9402f81907f5810d70fc421b456791d624ba1a Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Thu, 26 Sep 2019 21:43:48 +0000 Subject: [PATCH] Make forward-button support help-echo function (bug#37515) * lisp/button.el (forward-button): Support help-echo function. --- lisp/button.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/button.el b/lisp/button.el index ca6f0d3b6ea..9112e518b0d 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -513,6 +513,9 @@ Returns the button found." nil (user-error (if wrap "No buttons!" "No more buttons"))) (let ((msg (and display-message (button-get button 'help-echo)))) + (when (functionp msg) + (setq msg (funcall msg (selected-window) (current-buffer) + (button-start button)))) (when msg (message "%s" msg))) button))) -- 2.39.2