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

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

[debbugs-tracker] bug#37515: closed (27.0.50; button.el doesn't support


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#37515: closed (27.0.50; button.el doesn't support help-echo function)
Date: Thu, 26 Sep 2019 21:45:01 +0000

Your message dated Fri, 27 Sep 2019 06:44:07 +0900
with message-id <address@hidden>
and subject line Re: bug#37515: 27.0.50; button.el doesn't support help-echo 
function
has caused the debbugs.gnu.org bug report #37515,
regarding 27.0.50; button.el doesn't support help-echo function
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
37515: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37515
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; button.el doesn't support help-echo function Date: Thu, 26 Sep 2019 10:14:52 +0900 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-cygwin)
Hi,

I found the `forward-button' command shows a Lisp function object
if the value of the `help-echo' text property at the destination
point is a function.  But is should be its return value.

,---- (info "(elisp) Special Properties")
| `help-echo'
|  If text has a string as its `help-echo' property, then when you
|  move the mouse onto that text, Emacs displays that string in the
|  echo area, or in the tooltip window (*note Tooltips::).
|
|  If the value of the `help-echo' property is a function, that
|  function is called with three arguments, WINDOW, OBJECT and POS and
|  should return a help string or `nil for none.
`----

So, `forward-button' should be fixed to something like this:

--8<---------------cut here---------------start------------->8---
--- button.el~  2019-07-30 21:20:12.288879200 +0000
+++ button.el   2019-09-26 01:12:28.492808400 +0000
@@ -513,8 +513,11 @@
             nil
          (user-error (if wrap "No buttons!" "No more buttons")))
       (let ((msg (and display-message (button-get button 'help-echo))))
-       (when msg
-         (message "%s" msg)))
+       (cond ((functionp msg)
+              (message
+               "%s" (funcall msg (selected-window) (current-buffer) (point))))
+             (msg
+              (message "%s" msg))))
       button)))
 
 (defun backward-button (n &optional wrap display-message no-error)
--8<---------------cut here---------------end--------------->8---

Thanks.



--- End Message ---
--- Begin Message --- Subject: Re: bug#37515: 27.0.50; button.el doesn't support help-echo function Date: Fri, 27 Sep 2019 06:44:07 +0900 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-cygwin)
On Thu, 26 Sep 2019 15:49:02 +0200, Lars Ingebrigtsen wrote:
> Looks good to me; please push.

Done.  Thanks.


--- End Message ---

reply via email to

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