In this case, it looks like calling code (Hrvoje's dframe-xemacs-popup-kludge) has
already been hacked for XEmacs, so I propose the following change
diff -u c:\Program Files\XEmacs\xemacs-packages\lisp\speedbar\dframe.el.~1~ c:\Program
Files\XEmacs\xemacs-packages\lisp\speedbar\dframe.el
--- c:\Program Files\XEmacs\xemacs-packages\lisp\speedbar\dframe.el.~1~ 2002-11-18
05:56:11.000000000 -0500
+++ c:\Program Files\XEmacs\xemacs-packages\lisp\speedbar\dframe.el 2002-11-18
05:56:11.000000000 -0500
@@ -818,7 +818,7 @@
(beginning-of-line)
(forward-char (min 5 (- (save-excursion (end-of-line) (point))
(save-excursion (beginning-of-line) (point)))))
- (popup-mode-menu)
+ (popup-mode-menu event)
;; Wait for menu to bail out. `popup-mode-menu' (and other popup
;; menu functions) return immediately.
(let (new)
-----Original Message-----
From: John Paul Wallington [mailto:jpw@shootybangbang.com]
Sent: Monday, November 18, 2002 2:58 AM
To: Paul Krause
Cc: xemacs-beta(a)xemacs.org
Subject: Re: [BUG] [24.1.10] mouse-position returns (nil nil) from
speedbar
"Paul Krause" <pkrause(a)soundbite.com> wrote:
Maybe the root of the problem is that event is nil. I don't know
why
that might be. In any
case, mouse-position returns (nil nil), so that (+ x winx) raises a type
error.
In XEmacs, when the cursor is *not over a character*, or not over a
window, the return value of `mouse-position' is a list (nil nil).
In Emacs `mouse-position' returns positional values based on
standard character cells, even if the cursor isn't over a character.
Additionally, Emacs returns (FRAME X . Y), XEmacs returns (WINDOW X . Y).
See:
http://list-archive.xemacs.org/xemacs-beta/200207/msg00225.html
Lots of code is written to Emacs spec, including code shipped with
XEmacs. Rather than fix all that code (and future code), it might be
more straightforward to change XEmacs' `mouse-position' to follow
Emacs spec, at least by default.
--
John Paul Wallington