unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65539: [PATCH] ; Fix push-button when triggered by a single keypress
@ 2023-08-25 17:48 Steven Allen
  2023-08-31  9:38 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Allen @ 2023-08-25 17:48 UTC (permalink / raw)
  To: 65539

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]


The following code was broken in the recent android merge:

    (keymap-set button-map "<return>" 'push-button)

The attached patch fixes this.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix push-button --]
[-- Type: text/x-patch, Size: 948 bytes --]

From c6270b325e322d5fc2c2eafba2661d7bc82ad47f Mon Sep 17 00:00:00 2001
From: Steven Allen <steven@stebalien.com>
Date: Fri, 25 Aug 2023 10:43:43 -0700
Subject: [PATCH] ; Fix push-button when triggered by a single keypress

* lisp/button.el (push-button): don't assume the event is a list, it may
be a single key.
---
 lisp/button.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/button.el b/lisp/button.el
index b01595943fc..bfe6ccc8d1f 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 (eq (car-safe pos) 'touchscreen-down)
                   ;; If touch-screen-track tap returns nil, then the
                   ;; tap was cancelled.
                   (when (touch-screen-track-tap pos)
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#65539: [PATCH] ; Fix push-button when triggered by a single keypress
  2023-08-25 17:48 bug#65539: [PATCH] ; Fix push-button when triggered by a single keypress Steven Allen
@ 2023-08-31  9:38 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2023-08-31  9:38 UTC (permalink / raw)
  To: Steven Allen; +Cc: 65539-done

> From: Steven Allen <steven@stebalien.com>
> Date: Fri, 25 Aug 2023 10:48:01 -0700
> 
> The following code was broken in the recent android merge:
> 
>     (keymap-set button-map "<return>" 'push-button)
> 
> The attached patch fixes this.

Thanks, installed on master, and closing the bug.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-31  9:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25 17:48 bug#65539: [PATCH] ; Fix push-button when triggered by a single keypress Steven Allen
2023-08-31  9:38 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).