]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix push-button when triggered by a single keypress
authorSteven Allen <steven@stebalien.com>
Fri, 25 Aug 2023 17:43:43 +0000 (10:43 -0700)
committerEli Zaretskii <eliz@gnu.org>
Thu, 31 Aug 2023 09:37:40 +0000 (12:37 +0300)
* lisp/button.el (push-button): Don't assume the event is
a list, it may be a single key.  (Bug#65539)

lisp/button.el

index b01595943fc3f268630baf5933316c570dd9fb21..bfe6ccc8d1fd9828e9841adfedeb75f01bc98f01 100644 (file)
@@ -492,7 +492,7 @@ pushing a button, use the `button-describe' command."
            (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)