]> git.eshelyaron.com Git - emacs.git/commitdiff
Make forward-button support help-echo function (bug#37515)
authorKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 26 Sep 2019 21:43:48 +0000 (21:43 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 26 Sep 2019 21:43:48 +0000 (21:43 +0000)
* lisp/button.el (forward-button): Support help-echo function.

lisp/button.el

index ca6f0d3b6ea173a3010ef365a3e5abf1571fbf3c..9112e518b0d12f45a438f5826943a9b3dd8b96dc 100644 (file)
@@ -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)))