diff options
| author | Katsumi Yamaoka | 2019-09-26 21:43:48 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2019-09-26 21:43:48 +0000 |
| commit | ed9402f81907f5810d70fc421b456791d624ba1a (patch) | |
| tree | 7ca6ac601af5a9850ccb69228dda5dda4eaebf5f | |
| parent | 648a6b7e912c97f9f4190cfd401274a2a33f31da (diff) | |
| download | emacs-ed9402f81907f5810d70fc421b456791d624ba1a.tar.gz emacs-ed9402f81907f5810d70fc421b456791d624ba1a.zip | |
Make forward-button support help-echo function (bug#37515)
* lisp/button.el (forward-button): Support help-echo function.
| -rw-r--r-- | lisp/button.el | 3 |
1 files changed, 3 insertions, 0 deletions
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." | |||
| 513 | nil | 513 | nil |
| 514 | (user-error (if wrap "No buttons!" "No more buttons"))) | 514 | (user-error (if wrap "No buttons!" "No more buttons"))) |
| 515 | (let ((msg (and display-message (button-get button 'help-echo)))) | 515 | (let ((msg (and display-message (button-get button 'help-echo)))) |
| 516 | (when (functionp msg) | ||
| 517 | (setq msg (funcall msg (selected-window) (current-buffer) | ||
| 518 | (button-start button)))) | ||
| 516 | (when msg | 519 | (when msg |
| 517 | (message "%s" msg))) | 520 | (message "%s" msg))) |
| 518 | button))) | 521 | button))) |