]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix `browse-url-interactive-arg' for certain kinds of events
authorPo Lu <luangruo@yahoo.com>
Sat, 20 Nov 2021 07:56:08 +0000 (15:56 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 20 Nov 2021 07:56:08 +0000 (15:56 +0800)
* lisp/net/browse-url.el (browse-url-interactive-arg): Don't
call `mouse-set-point' unless event is actually a mouse event.

lisp/net/browse-url.el

index 3af37e412d98f4cb36a00f393da17c39d4b16d6e..50d11b4b7252f80c2d0eb9883833cd14fdf306c9 100644 (file)
@@ -730,7 +730,8 @@ position clicked before acting.
 This function returns a list (URL NEW-WINDOW-FLAG)
 for use in `interactive'."
   (let ((event (elt (this-command-keys) 0)))
-    (and (listp event) (mouse-set-point event)))
+    (when (mouse-event-p event)
+      (mouse-set-point event)))
   (list (read-string prompt (or (and transient-mark-mode mark-active
                                     ;; rfc2396 Appendix E.
                                     (replace-regexp-in-string