From: Po Lu Date: Sat, 20 Nov 2021 07:56:08 +0000 (+0800) Subject: Fix `browse-url-interactive-arg' for certain kinds of events X-Git-Tag: emacs-28.0.90~54 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=354c834fba5806ba873b50bf900c42dce5d9da90;p=emacs.git Fix `browse-url-interactive-arg' for certain kinds of events * lisp/net/browse-url.el (browse-url-interactive-arg): Don't call `mouse-set-point' unless event is actually a mouse event. --- diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 3af37e412d9..50d11b4b725 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -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