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.
This commit is contained in:
Po Lu 2021-11-20 15:56:08 +08:00
parent c1eea85be1
commit 354c834fba

View 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