From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#37515: 27.0.50; button.el doesn't support help-echo function Date: Thu, 26 Sep 2019 10:14:52 +0900 Organization: Emacsen advocacy group Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="103103"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-cygwin) Cc: "Jose A. Ortega Ruiz" To: 37515@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 26 03:16:19 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDIOI-000Qin-Fz for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Sep 2019 03:16:18 +0200 Original-Received: from localhost ([::1]:58734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDIOG-0003d9-P9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Sep 2019 21:16:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38612) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDIO3-0003aE-NM for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2019 21:16:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDIO2-0001xF-NL for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2019 21:16:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33718) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iDIO2-0001x9-Jw for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2019 21:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iDIO2-0002mM-CA for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2019 21:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Sep 2019 01:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37515 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156946051210617 (code B ref -1); Thu, 26 Sep 2019 01:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Sep 2019 01:15:12 +0000 Original-Received: from localhost ([127.0.0.1]:42539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDINE-0002lB-Eu for submit@debbugs.gnu.org; Wed, 25 Sep 2019 21:15:12 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDINC-0002l1-RC for submit@debbugs.gnu.org; Wed, 25 Sep 2019 21:15:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38352) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDINB-0002gp-Pt for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2019 21:15:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDIN9-0001JC-0m for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2019 21:15:07 -0400 Original-Received: from bisque.elm.relay.mailchannels.net ([23.83.212.18]:46596) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDIN8-0001I9-Ns; Wed, 25 Sep 2019 21:15:06 -0400 X-Sender-Id: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 6018B5E0BC1; Thu, 26 Sep 2019 01:15:05 +0000 (UTC) Original-Received: from hampton.hostforweb.net (100-96-84-26.trex.outbound.svc.cluster.local [100.96.84.26]) (Authenticated sender: tih5qno0ow) by relay.mailchannels.net (Postfix) with ESMTPA id 46E8B5E0CA6; Thu, 26 Sep 2019 01:15:04 +0000 (UTC) X-Sender-Id: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net Original-Received: from hampton.hostforweb.net ([TEMPUNAVAIL]. [172.245.115.217]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.1); Thu, 26 Sep 2019 01:15:05 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: tih5qno0ow|x-authuser|yamaoka@hampton.hostforweb.net X-MailChannels-Auth-Id: tih5qno0ow X-Robust-Little: 0be76eea6f3a1549_1569460504963_4110727099 X-MC-Loop-Signature: 1569460504963:844341028 X-MC-Ingress-Time: 1569460504962 Original-Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60001 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1iDIMx-0060zZ-EN; Wed, 25 Sep 2019 20:14:56 -0500 X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Cancel-Lock: sha1:uo/qErszFdOxj36fORjsa4NquJM= X-OutGoing-Spam-Status: No, score=-0.2 X-AuthUser: yamaoka@hampton.hostforweb.net X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:167199 Archived-At: 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.