emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-30 d05d8c336c8: xwidget: Fix xwidget-at misinterpreting non-xwidge


From: Eli Zaretskii
Subject: emacs-30 d05d8c336c8: xwidget: Fix xwidget-at misinterpreting non-xwidget text-properties
Date: Thu, 29 Aug 2024 08:13:35 -0400 (EDT)

branch: emacs-30
commit d05d8c336c82457dcad3b924b19c3bb57ff0e791
Author: George Huebner <george@feyor.sh>
Commit: Eli Zaretskii <eliz@gnu.org>

    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
---
 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)))
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]