all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@member.fsf.org>
To: emacs-devel@gnu.org
Subject: popup-menu with keyboard menu
Date: Sat, 27 Sep 2008 15:48:36 -0400	[thread overview]
Message-ID: <uod29gyjv.fsf_-_@member.fsf.org> (raw)
In-Reply-To: <loom.20080927T164740-80@post.gmane.org> (Adrian Robert's message of "Sat\, 27 Sep 2008 16\:52\:09 +0000 \(UTC\)")

I'm calling popup-menu with a keyboard menu, rather than from a mouse
action.

It's failing with "Wrong type argument: integerp, nil" if the mouse is
outside the Emacs frame (which it normally is, for me).

This patch fixes the problem:

===================================================================
RCS file: /sources/emacs/emacs/lisp/mouse.el,v
retrieving revision 1.347
diff -u -r1.347 mouse.el
--- lisp/mouse.el	11 Aug 2008 01:23:05 -0000	1.347
+++ lisp/mouse.el	27 Sep 2008 19:36:59 -0000
@@ -109,9 +109,7 @@
 				   (plist-get (get map 'menu-prop) :filter))))
 		    (if filter (funcall filter (symbol-function map)) map)))))
 	 event cmd)
-    (unless position
-      (let ((mp (mouse-pixel-position)))
-	(setq position (list (list (cadr mp) (cddr mp)) (car mp)))))
+    (unless position (setq position t))
     ;; The looping behavior was taken from lmenu's popup-menu-popup
     (while (and map (setq event
 			  ;; map could be a prefix key, in which case
===================================================================

'position' is later passed to x-popup-menu, which properly handles the
case of the mouse being outside the frame.

-- 
-- Stephe




  reply	other threads:[~2008-09-27 19:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-26 22:57 CVS HEAD still broken for OSX "make all install" for .app creation Randal L. Schwartz
2008-09-27 16:52 ` CVS HEAD still broken for OSX Adrian Robert
2008-09-27 19:48   ` Stephen Leake [this message]
2008-09-29 19:52     ` popup-menu with keyboard menu Glenn Morris
2008-09-30  6:49       ` Stephen Leake
2008-09-30  6:53         ` Glenn Morris
2008-09-30 11:31           ` Stephen Leake
2008-10-01 17:12             ` Glenn Morris
2008-09-28 17:33   ` CVS HEAD still broken for OSX Randal L. Schwartz
2008-09-29 21:34     ` Adrian Robert
2008-09-30  2:46       ` Randal L. Schwartz
2008-09-30  3:00         ` Randal L. Schwartz
2008-09-30 13:32           ` Adrian Robert

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

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

  git send-email \
    --in-reply-to=uod29gyjv.fsf_-_@member.fsf.org \
    --to=stephen_leake@member.fsf.org \
    --cc=emacs-devel@gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.