From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66192: 30.0.50; lisp/buttons.el (push-button) fails to handle the action on gui emacs Date: Tue, 26 Sep 2023 08:50:28 +0800 Message-ID: <87jzsdoizv.fsf@yahoo.com> References: <20230925.204020.1677927434335496083.enometh@meer.net> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37634"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66192@debbugs.gnu.org To: Madhu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 26 02:52:15 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qkwJC-0009Ys-CX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Sep 2023 02:52:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkwIq-0006Jo-Ln; Mon, 25 Sep 2023 20:51:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkwIn-0006JG-Ia for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 20:51:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qkwIn-0001QP-AC for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 20:51:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkwIz-0006NP-M4 for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 20:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Sep 2023 00:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66192 X-GNU-PR-Package: emacs Original-Received: via spool by 66192-submit@debbugs.gnu.org id=B66192.169568946524438 (code B ref 66192); Tue, 26 Sep 2023 00:52:01 +0000 Original-Received: (at 66192) by debbugs.gnu.org; 26 Sep 2023 00:51:05 +0000 Original-Received: from localhost ([127.0.0.1]:46921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkwI5-0006M6-1p for submit@debbugs.gnu.org; Mon, 25 Sep 2023 20:51:05 -0400 Original-Received: from sonic307-10.consmr.mail.ne1.yahoo.com ([66.163.190.33]:42711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkwI1-0006La-Nx for 66192@debbugs.gnu.org; Mon, 25 Sep 2023 20:51:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695689442; bh=0Oq7G2D5TipgiBtRD2bQ4w6aVwOam3Df+qAnuz5fcsU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Exs1+CuzSAsOy9nJJIgT7ckZmAHSHWyQwH5ElZhO/P5nyjNa1ZPRTdcErxP3oo2iRxfmuc2WtPXYFcnyssLEm2NDyIymgLQWjdXJWj2m6wc+opK+Mds7wZaaPhqX4aQ6/qMd3XpIocyQjPn8LEx0yDgkbGt1nWachYWnF0MQ3BVhnm3mEoVIPucY/Ht9mOqmSDULplLJpwIXYQQ6pMC8E97sH15FvggEtzCoS5m2mFXQvrUwqEtiDI0mqtnOd3B/M1VYFypA48gLBUQHa8He1Ow/x1ZR5gCAMcG137IZ2xFmxw8EwKysrvqBxoYkVFDh98YitJvu2wa/93uvyUh7Dw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695689442; bh=Pp6VjgaL6A/nxGr5ArITs5fas3Cz2/qoGxmHdylAeqo=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=KNIlihmoFkrE6Bo9AGviSAB0VjnB+iE7J/5/bb9L/+nn3drzxgv2W5OQqqpx5BLNWyVVAVcTtPhRvwNoxFofCZ0NUiGbdNaNjGM5LtvqwBytTmNEOf0+I5skxfsniqdOyyfEvtLAeXIQ60UvsziWX4fswi5TIF7zYVWKdevJrT7XJE52zdjNlSCrN4Vse/6GakXBwQtNrnU9bh41irV2oG9A/fkYzwAPCMUmngAYrrWSifvv0ClVDvC/ygppfKoXbbyixDmGywW0tSCFRF6Rd7AhgAxazCo7mKi+3Ryw8IDR6ZVIxF2pYKOHSfUkkU0w/gMXDh15v1ByA2C2uknBeA== X-YMail-OSG: 88bpftYVM1nGWuJAx54JEBRalXXed2G8oPih02zDgAckqs37S5xZswpD0Uemmcn DTswR6vSDyH0HbhH7yQYXsuSuCnTpqbtJtAOMWXfZs74RyoZOAL13aYdEA8ivHkOBGc5mi99C3YN 4L2joSlYNLeZAbFQC9SpJ_f6qkT4N4snl4FjdpyB_46JG4HpAu7Rjbb9JZPKzqFpDq8qNmvCUhT6 lrlgQFh493SQrIop60DUuav0UZ1IxsIwKfk2nhgk3TjRBhZSZtaiiaIjwaFs0kI78jcqNhXaQhvh URLebiORnXK_VdTwLlOfIz.pfBRnuHGEj.ERcdoUyOcw5B0u4Aqc7ZAiMu17tngXsdWTMmvh_E9D J5wsT.Kn42HgMk_TdSU7Vuxpmzpfie3VsOYyOrUs5EA_zyjHpjhV.PeJ.NZF9SwsgZT5yk0QWbQc A9ptaMx_yJUinGiLWdbAIemB8deLBSqYL2RN3q4ec2nA525LsErDtjH6wbJXzNoT0O745yvWnmQE 7gO1ByugygjMjCiR7NI77yy.p4MOkRQuq1ILITtEmJ6wO8UPDc4gBHt.xJXSC_MdzDaWlCRF92AE 3.jwWt__Zd7pf3C7AFOxN14FOnxUJ9s.TJ6ZKpeAULzPt_3SdTSRRIaqt2vtZONl69rbLOxCj8X8 dDgJOYprGxFl5Bq3VQQT0LgTmxhOyiOMQBa8e9.mWB1m.nAr7YDQqB8UGaepXeEQEIaP5uqiyUS5 pv9JqugZ0JkTuEBYEfHObHttAJKICDk00xBF5EArHkW9JDyGqn_hRbFcSk7.O9TUXXQrgyMpCRwC ltNxBtLnpbLF8IQAp5VEILwn..siJL3F4AlUqsOBVt X-Sonic-MF: X-Sonic-ID: 0622abb7-efdd-40e4-a78e-1876d7174efc Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Tue, 26 Sep 2023 00:50:42 +0000 Original-Received: by hermes--production-sg3-55c667b499-wx5qv (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 91ca706f99ae7943252133a8e45a4e14; Tue, 26 Sep 2023 00:50:34 +0000 (UTC) In-Reply-To: <20230925.204020.1677927434335496083.enometh@meer.net> (Madhu's message of "Mon, 25 Sep 2023 20:40:20 +0530 (IST)") X-Mailer: WebService/1.1.21797 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271356 Archived-At: Madhu writes: > * commit a496509cedb17109d0e6297a74e2ff8ed526333c > |Commit: Po Lu > |CommitDate: Thu Jan 19 22:19:06 2023 +0800 > > Introduced a change to lisp/button.el:(push-button) which causes the > following recipe to fail. Consider a buffer with the following > contents: > > ``` > ;;text-button > > (defvar-keymap my-button-map :parent button-map "" 'push-button) > (setq $but (make-text-button 1 10 > 'action #'(lambda(b) (message "push-button %S" b)) > 'keymap my-button-map)) > ``` > > evaluating the buffer sets up a text button in the first line. In a gui > emacs Hitting RET on the button fails with an error: > "push-button: Wrong type argument: listp, return". > > The following patch fixes it for me but maybe there is some other issue? > >>>From e69be9cf0af72c5fcda8cda05b50a556741009b2 Mon Sep 17 00:00:00 2001 > From: Madhu > Date: Mon, 25 Sep 2023 20:20:05 +0530 > Subject: [PATCH] lisp/button.el: (push-button): handle kbd > > --- > lisp/button.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lisp/button.el b/lisp/button.el > index b01595943fc..0e98ec722d9 100644 > --- a/lisp/button.el > +++ b/lisp/button.el > @@ -492,7 +492,7 @@ push-button > (if str-button > ;; mode-line, header-line, or display string event. > (button-activate str t) > - (if (eq (car pos) 'touchscreen-down) > + (if (and (listp pos) (eq (car pos) 'touchscreen-down)) > ;; If touch-screen-track tap returns nil, then the > ;; tap was cancelled. > (when (touch-screen-track-tap pos) Thanks, but I elected to fix this differently. Please test.