The patch below fixes this. Note that, in addition to fixing the bug,
it seems to point out a problem with the `x-popup-menu' docstring
which says:
x-popup-menu is a built-in function in `C source code'.
(x-popup-menu position menu)
Pop up a deck-of-cards menu and return user's selection.
position is a position specification. This is either a mouse button event
or a list ((XOFFSET YOFFSET) WINDOW)
where XOFFSET and YOFFSET are positions in pixels from the top left
corner of WINDOW's frame. (WINDOW may be a frame object instead of a window.)
This controls the position of the center of the first line
in the first pane of the menu, not the top left of the menu as a whole.
But applying the patch below, which uses (0 0) for (XOFFSET YOFFSET)
seems to show that it controls the position of the top left of the
menu as a whole, no matter how clearly this is denied above.
===File ~/mouse.el-diff=====================================
*** mouse.el 12 Nov 2004 19:47:19 -0600 1.257
--- mouse.el 04 Dec 2004 17:35:29 -0600
***************
*** 2201,2207 ****
(progn (unless (display-multi-font-p)
(error "Cannot change fonts on this display"))
(x-popup-menu
! last-nonmenu-event
;; Append list of fontsets currently defined.
(append x-fixed-font-alist (list (generate-fontset-menu))))))
(if fonts
--- 2201,2209 ----
(progn (unless (display-multi-font-p)
(error "Cannot change fonts on this display"))
(x-popup-menu
! (if (listp last-nonmenu-event)
! last-nonmenu-event
! (list '(0 0) (selected-window)))
;; Append list of fontsets currently defined.
(append x-fixed-font-alist (list (generate-fontset-menu))))))
(if fonts