1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

Make xwidget-event-handler more resilient

* lisp/xwidget.el (xwidget-event-handler): Don't try to call the
callback if it hasn't been defined.
This commit is contained in:
Lars Ingebrigtsen 2021-11-09 05:48:28 +01:00
parent 97fa2ffdf7
commit 272693c6fd

View File

@ -348,7 +348,8 @@ If N is omitted or nil, scroll backwards by one char."
((xwidget-event-type (nth 1 last-input-event))
(xwidget (nth 2 last-input-event))
(xwidget-callback (xwidget-get xwidget 'callback)))
(funcall xwidget-callback xwidget xwidget-event-type)))
(when xwidget-callback
(funcall xwidget-callback xwidget xwidget-event-type))))
(defun xwidget-webkit-callback (xwidget xwidget-event-type)
"Callback for xwidgets.