unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: emacs-28 354c834: Fix `browse-url-interactive-arg' for certain kinds of events
Date: Sat, 20 Nov 2021 08:20:53 -0500	[thread overview]
Message-ID: <jwv4k870xv6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20211120075814.63AB3209FD@vcs0.savannah.gnu.org> (Po Lu's message of "Sat, 20 Nov 2021 02:58:14 -0500 (EST)")

>     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.
> ---
>  lisp/net/browse-url.el | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
> index 3af37e4..50d11b4 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

Shouldn't this be fixed in `mouse-set-point` (or even `event-end` and
`event-start`) instead, and then we should remove the `listp` test since
`mouse-set-point` nowadays should work with any kind of event.


        Stefan




       reply	other threads:[~2021-11-20 13:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211120075812.24103.86181@vcs0.savannah.gnu.org>
     [not found] ` <20211120075814.63AB3209FD@vcs0.savannah.gnu.org>
2021-11-20 13:20   ` Stefan Monnier [this message]
2021-11-21  8:29     ` emacs-28 354c834: Fix `browse-url-interactive-arg' for certain kinds of events Lars Ingebrigtsen
2021-11-21  9:19       ` Po Lu
2021-11-21 14:37         ` Stefan Monnier
2021-11-21 17:04           ` Lars Ingebrigtsen
2021-11-22  0:45           ` Po Lu
2021-11-22 19:25             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4k870xv6.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).