bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50256: thing-at-mouse


From: Juri Linkov
Subject: bug#50256: thing-at-mouse
Date: Sun, 05 Sep 2021 19:13:15 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> (1) Fix it in a general way.  You don't want to do that because it might
>     harm calls of that function that silently worked until now.
>
> (2) Fix it by modifying the calls of `pos-visible-in-window-p'.  In that
>     case the warning should help us find the calls that should be fixed.

Since there is no way to fix (1), I sent a fix for (2):

diff --git a/lisp/subr.el b/lisp/subr.el
index 6ae6d242a4..bf0177a846 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1510,8 +1510,8 @@ event-start
 
 For more information, see Info node `(elisp)Click Events'."
   (if (consp event) (nth 1 event)
-    (or (posn-at-point)
-        (list (selected-window) (point) '(0 . 0) 0))))
+    (or (posn-at-point (window-point))
+        (list (selected-window) (window-point) '(0 . 0) 0))))
 
 (defun event-end (event)
   "Return the ending position of EVENT.
@@ -1519,8 +1519,8 @@ event-end
 
 See `event-start' for a description of the value returned."
   (if (consp event) (nth (if (consp (nth 2 event)) 2 1) event)
-    (or (posn-at-point)
-        (list (selected-window) (point) '(0 . 0) 0))))
+    (or (posn-at-point (window-point))
+        (list (selected-window) (window-point) '(0 . 0) 0))))
 
 (defsubst event-click-count (event)
   "Return the multi-click count of EVENT, a click or drag event.





reply via email to

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