bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37515: 27.0.50; button.el doesn't support help-echo function


From: Basil L. Contovounesios
Subject: bug#37515: 27.0.50; button.el doesn't support help-echo function
Date: Mon, 30 Sep 2019 20:53:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> diff --git a/lisp/button.el b/lisp/button.el
> index 9112e518b0..ae2488bac6 100644
> --- a/lisp/button.el
> +++ b/lisp/button.el
> @@ -470,13 +470,22 @@ push-button
>       (button-activate button use-mouse-action)
>       t))))
>  
> +(defun button--help-echo (button)
> +  "Evaluate BUTTON's `help-echo' property and return its value."
> +  (let ((help (button-get button 'help-echo)))
> +    (if (functionp help)
> +        (let ((obj (if (overlayp button) button (current-buffer))))
> +          (funcall help (selected-window) obj (button-start button)))
> +      (eval help lexical-binding))))

Note that I intend to enable lexical-binding in button.el in a future
patch, in which case this call to eval will not need changing.

-- 
Basil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]