Patch: File menu in recent CVS Emacs no longer called 'files

2004-11-10 Thread Jason Rumney

The File menu has recently been renamed from 'files to 'file in Emacs
CVS. This has revealed a dependancy in JDEE that can easily be fixed
by using menu-bar-file-menu (which has existed since at least 19.27)
which also simplifies the code a little:


*** jde.el-orig Fri Oct 29 00:43:02 2004
--- jde.el  Wed Nov 10 23:09:59 2004
***
*** 1247,1258 
(when (fboundp 'add-submenu)
  (add-submenu '("File") val "Insert File...")))
(let* ((mb (assq 'menu-bar global-map))
-  (files (assq 'files mb))
   (menu (if (fboundp 'easy-menu-create-menu)
 (easy-menu-create-menu
  (car val) (cdr val
   (menu-name (car val)))
! (define-key-after (cdr (cdr files)) [jde-new]
(cons menu-name menu)
'open-file)

--- 1247,1257 
(when (fboundp 'add-submenu)
  (add-submenu '("File") val "Insert File...")))
(let* ((mb (assq 'menu-bar global-map))
   (menu (if (fboundp 'easy-menu-create-menu)
 (easy-menu-create-menu
  (car val) (cdr val
   (menu-name (car val)))
! (define-key-after menu-bar-file-menu [jde-new]
(cons menu-name menu)
'open-file)


Re: Error when running an application within JDE

2004-11-10 Thread Troy Daniels
At 01:09 PM 11/10/2004 -0500, Paul Kinnucan wrote:
Troy Daniels writes:
 > To: [EMAIL PROTECTED]
 > Subject:
 > --text follows this line--
 >
 > Please enter the details of your bug report here
 >
Hi Troy,
It's possible that win32-start-process-show-window was not defined
when jde-run.elc was compiled. I'll investigate. Meanwhile, workarounds
are to run jde-run.el or try using the jde-compile-jde command to compile
the JDEE. That should ensure that the macro is defined when jde-run.el
is compiled.
I had to delete all the .elc files first, but jde-compile-jde worked.
To avoid this problem, you or Arthur might want to change line 343-345 from
cd "../$JDE_FILE/lisp"
"$EMACS" --no-site-file -batch -l ../../compile-script -f \
batch-byte-compile *.el &>emacs_c.log
to
cd "../$JDE_FILE/lisp"
"$EMACS" --no-site-file -batch -l ../../compile-script -f \
--execute "(require 'jde)" -f jde-compile-jde &>emacs_c.log
Looking at the output, I think there might be a bug in 
jde-run-etrace-show-at-mouse.  The byte-compiler complains that

Compiling file d:/Programs/emacs-21.2/site-lisp/jde/lisp/jde-run.el at Wed 
Nov 10 13:55:48 2004

While compiling jde-run-etrace-show-at-mouse:
  ** reference to free variable pos
The code for that function is
(defun jde-run-etrace-show-at-mouse (event)
  "Jump to the stack position at the mouse click.
Click anywhere on the line with the stack reference."
  (interactive "e")
  (if jde-xemacsp
  (set-marker (car jde-run-etrace-current-marker)
  (event-point pos)
  (window-buffer (event-window pos)))
(let ((pos (event-start event)))
  (set-marker (car jde-run-etrace-current-marker)
  (posn-point pos)
  (window-buffer (posn-window pos)
  (jde-run-etrace-goto))
Note that if jde-xemacsp, then pos is used but not defined.  I think you 
want this instead.  Unless you use the Xemacs, you won't notice the problem.

(defun jde-run-etrace-show-at-mouse (event)
  "Jump to the stack position at the mouse click.
Click anywhere on the line with the stack reference."
  (interactive "e")
  (let ((pos (event-start event)))  ;; this line moved here
(if jde-xemacsp
(set-marker (car jde-run-etrace-current-marker)
(event-point pos)
(window-buffer (event-window pos)))
  (set-marker (car jde-run-etrace-current-marker)
  (posn-point pos)
  (window-buffer (posn-window pos)
  (jde-run-etrace-goto))
Troy

Troy Daniels
[EMAIL PROTECTED]
781-273-3388 x218