From: Katsumi Yamaoka Date: Thu, 26 Sep 2019 21:43:48 +0000 (+0000) Subject: Make forward-button support help-echo function (bug#37515) X-Git-Tag: emacs-27.0.90~1416 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ed9402f81907f5810d70fc421b456791d624ba1a;p=emacs.git Make forward-button support help-echo function (bug#37515) * lisp/button.el (forward-button): Support help-echo function. --- 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)))