Matthias Radestock wrote:
> The lack of key bindings for JDEbug under XEmacs has been annoying me
> for a while. As far as I can tell, modern XEmacs use exactly the same
> mechanism for establishing minor mode key maps as Emacs. Thus, simply
> ripping out the special code that deals with XEmacs in
> jde-bug-install-jdebug-menu and jde-bug-remove-jdebug-menu and using the
> Emacs code instead should fix the problem:
>
Oops, ripped out a bit too much there - we still want a nice and pretty
JDEbug menu don't we ;) :
(defun jde-bug-install-jdebug-menu ()
"Installs the jdebug menu in the current Java source buffer
if the user has selected jdebug as the debugger for the current
project."
(setq jde-bug-minor-mode-p t)
(let ((a (assoc 'jde-bug-minor-mode-p minor-mode-map-alist)))
(if a (setcdr a jde-bug-keymap)
(add-to-list 'minor-mode-map-alist
(cons 'jde-bug-minor-mode-p
jde-bug-keymap))))
(if (and
jde-xemacsp
(not (featurep 'infodock))
(not (memq 'infodock c-emacs-features))
(boundp 'current-menubar)
current-menubar
(not (car (find-menu-item current-menubar '("JDEbug")))))
(if (fboundp 'add-submenu)
(add-submenu nil jde-bug-menu)
(add-menu nil "JDEbug" (cdr jde-bug-menu)))))
(defun jde-bug-remove-jdebug-menu ()
"Removes the jdebug menu from the menubar of the current Java source
buffer."
(setq jde-bug-minor-mode-p nil)
(if (and
jde-xemacsp
(not (featurep 'infodock))
(not (memq 'infodock c-emacs-features))
(boundp 'current-menubar)
current-menubar)
(if (fboundp 'delete-menu-item)
(delete-menu-item '("JDEbug")))))
Matthias.