From a74a99b8cc0b215959cff1076b4d7da6e2b0ad73 Mon Sep 17 00:00:00 2001 From: George Huebner Date: Sun, 14 Jul 2024 01:46:07 -0500 Subject: [PATCH] xwidget: Fix xwidget-at misinterpreting non-xwidget text-properties 'xwidget-open' wrongly assumed the the text-property at min-position is an xwidget, if it exists; the fix is just returning nil if the text-property isn't an xwidget. * lisp/xwidget.el (xwidget-at): Use 'ignore-errors'. (Bug#72848) Copyright-paperwork-exempt: yes (cherry picked from commit d05d8c336c82457dcad3b924b19c3bb57ff0e791) --- lisp/xwidget.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/xwidget.el b/lisp/xwidget.el index bf5987d742f..c5a84db6d4a 100644 --- a/lisp/xwidget.el +++ b/lisp/xwidget.el @@ -81,7 +81,7 @@ This returns the result of `make-xwidget'." (defun xwidget-at (pos) "Return xwidget at POS." (let* ((disp (get-text-property pos 'display)) - (xw (car (cdr (cdr disp))))) + (xw (ignore-errors (car (cdr (cdr disp)))))) (when (xwidget-live-p xw) xw))) -- 2.39.2