unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jared Finder <jared@finder.org>
Cc: emacs-devel@gnu.org
Subject: Re: Making TTY menus more visual
Date: Mon, 12 Oct 2020 17:45:55 +0300	[thread overview]
Message-ID: <83362j4i58.fsf@gnu.org> (raw)
In-Reply-To: <184d04bc36d1a7204238d8508ec48531@finder.org> (message from Jared Finder on Sun, 11 Oct 2020 20:25:13 -0700)

> Date: Sun, 11 Oct 2020 20:25:13 -0700
> From: Jared Finder <jared@finder.org>
> Cc: emacs-devel@gnu.org
> 
> While working on the next feature I wanted to get working with 
> xterm-mouse (help-echo and mouse-face text properties), I noticed a bug. 
> Attached is a patch to apply after the rest of the changes to fix the 
> issue.

Thanks.

> -(defun menu-bar-open-mouse (event)
> +(defun menu-bar-open-mouse (position)
>    "Open the menu bar for the menu item clicked on by the mouse.
> -EVENT should be a mouse down or click event.
> +POSITION should be a list of the form returned by `mouse-position'.
>  
>  Also see `menu-bar-open', which this calls.
>  This command is to be used when you click the mouse in the menubar."
> -  (interactive "e")
> -  (let* ((x-position (car (posn-x-y (event-start event))))
> +  (interactive (list (mouse-position)))
> +  (let* ((x-position (cadr position))

I'd prefer not to lose the "e" interactive spec and the form of the
argument here.  If the problem is the conversion of window-relative to
frame-relative coordinates, that is easy, and the ELisp manual has an
example of how to do that in the node "Accessing Mouse".

Or is there some problem to use this here?



  reply	other threads:[~2020-10-12 14:45 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02  6:16 Making TTY menus more visual Jared Finder via Emacs development discussions.
2020-10-02  7:31 ` Eli Zaretskii
2020-10-03  0:16   ` Jared Finder via Emacs development discussions.
2020-10-03  8:50     ` Eli Zaretskii
2020-10-03 19:26       ` Jared Finder via Emacs development discussions.
2020-10-03 22:28         ` Jared Finder via Emacs development discussions.
2020-10-03 23:25           ` Jared Finder via Emacs development discussions.
2020-10-04  6:43           ` Eli Zaretskii
2020-10-04  9:04             ` Eli Zaretskii
2020-10-05  5:36               ` Jared Finder via Emacs development discussions.
2020-10-05  6:45                 ` Eli Zaretskii
2020-10-08  6:39                   ` Jared Finder via Emacs development discussions.
2020-10-08  8:15                     ` Eli Zaretskii
2020-10-09  5:17                       ` Jared Finder via Emacs development discussions.
2020-10-09 15:02                         ` Eli Zaretskii
2020-10-10  5:20                           ` Jared Finder via Emacs development discussions.
2020-10-10  7:28                             ` Eli Zaretskii
2020-10-12  3:25                               ` Jared Finder via Emacs development discussions.
2020-10-12 14:45                                 ` Eli Zaretskii [this message]
2020-10-12 21:30                                   ` Jared Finder via Emacs development discussions.
2020-10-13 14:33                                     ` Eli Zaretskii
2020-10-14  1:59                                       ` Jared Finder via Emacs development discussions.
2020-10-15 13:34                                         ` Eli Zaretskii
2020-10-16  6:51                                           ` Eli Zaretskii
2020-10-16 16:18                                             ` Jared Finder via Emacs development discussions.
2020-10-24 10:31                                     ` Eli Zaretskii
2020-10-25  0:27                                       ` Jared Finder via Emacs development discussions.
2020-10-31  8:05                                         ` Eli Zaretskii
2020-10-24 10:25                               ` Eli Zaretskii
2020-10-04  6:22         ` Eli Zaretskii
2020-10-04  6:24         ` Eli Zaretskii
2020-10-04 22:15           ` Jared Finder via Emacs development discussions.

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=83362j4i58.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jared@finder.org \
    /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).