Re: variables set in prj.el bleeding thru to custom.el

2003-12-22 Thread Michael Schierl
On Mon, 22 Dec 2003 11:51:27 -0800 (PST), Paul Erion wrote:

 Oops, I don't really remember how I initially created prj.el -- it was a while 
 ago.  I
 just happened to be looking over my ~/.xemacs/custom.el file and noticed that 
 variables
 that were being set in prj.el were also being (unexpectedly) set in custom.el.  
 And
 deleting them (via editing) from custom.el did not make them go away (that is, the 
 code
 to set those variables kept reappearing).

*if* you want to edit custom.el, do it outside emacs (and when no emacs is
open). Usually its is a better idea to do 

M-x customize-variable your-variable

and then select erase customization (you should not have opened any
JDE-mode files while you do that so that you do not mess up any prj.el
files) to remove entries from your custom.el.

HTH,

Michael



Re: cedet-1.0beta1 /Semantic 2.0 and JDEE-2.3.2

2003-12-18 Thread Michael Schierl
Paul Kinnucan schrieb:

 This effectively disables the resetting of existing open buffers
 when a user customizes jde-enable-senator. I would rather fix the
 bug then cripple a function in order to avoid it. 

Sure. But it is better to cripple a feature out of my jde i (and 
probably others) never use instead of changing load path (for older 
semantic version) and restarting emacs whenever i want to use jde or 
not...

 I've narrowed
 the problem, i.e., resetting the value of jde-enable-senator
 triggers the error:
 
   Setting JDE variables to startup values... [3 times]
   wisent-java-tags-lexer:
   Wrong type argument: stringp, nil

BTW: working.el seems to have fun with duplicating messages and 
confusing the user debugging it:

(progn
  (message One)
  (message Two)
  (working-status-forms Doing stuff done
(working-status 10)
(working-status 80)
(working-status 90)
(working-status t))
  (message Three!))

produces:

One
Two [2 times]
Three!

 to the java version of the semantic-parse-region function. However, I
 cannot get any further because the semantic java parser is implemented
 via macros that cannot be enabled for edebugging, which is the only
 way I know how to find the exact line that causes a particular
 error. 

Same for me ;) That's why i stopped there with debugging. Further more, 
it does work when you call that (senator-minor-mode 1) function by hand, 
so there must be some side effect with the code calling it.


 (BTW, I find the heavy reliance on macros a serious problem
 with the design of semantic 2.0; it makes debugging problems with
 semantic next to impossible, at least that has been my experience so
 far.)  Perhaps Eric or David can find the line that causes the error
 or suggest a way for me to find it so this bug can be fixed.

it could work to expand the macros into a temp buffer and edebug 
there - but that is not easy either. to make it a bit easier:

(defun make-expanded-macro ()
  Treat the current `defun' around point as a macro
and expand it into a temp buffer.
  (interactive)
  (let (beg end expr)
(beginning-of-defun)
(setq beg (point))
(end-of-defun)
(setq end (point))
(setq expr (read (buffer-substring beg end)))
(with-current-buffer (get-buffer-create *expanded-macros*)
  (emacs-lisp-mode)
  (goto-char (point-max))
  (insert \n\n\n 
  (prin1-to-string (macroexpand expr
(pop-to-buffer (get-buffer-create *expanded-macros*

Michael


Re: cedet-1.0beta1 /Semantic 2.0 and JDEE-2.3.2

2003-12-15 Thread Michael Schierl
On Tue, 9 Dec 2003 18:03:26 -0500, Paul Kinnucan wrote:
 Michael Schierl writes:
   On Thu, 6 Nov 2003 13:17:50 -0500, Paul Kinnucan wrote:
   
   When I use that one with cedet-1.0beta1c on emacs-21.3 (Windows), it works
   as long as i only edit one file. When I open the second file (or do a M-x
   jde-mode RET in the first one), I see 
   
 
 I was not able to get cedet-1.0beta1c to load on my Windows system, let alone
 work with the JDEE 2.3.3.

Hmm, my windows system (w/ cygwin) did not make any problems. just run make
and then add the line mentioned in the INSTALL file into .emacs (it will
create the needed load path itself).

Some investigation with lots of (message)s and edebug-sessions later, i
noticed that the error does not occur when i disable
jde-project-context-switching-enabled-p. It does not occur either when i
load the project manually afterwards (huh?).

After some stepping through jde-set-variables-init-value, the problem is 
(funcall set symbol val-to-set) on jde-enable-senator.

So the shortest hack to make it work with latest cedet seems to be changing
the set function for jde-enable-senator.

Now i simply use:

(defcustom jde-enable-senator t
  Enable senator minor mode.
This mode provides Java-aware buffer navigation and searching
commands.
  :group 'jde-project
  :type 'boolean
  :set '(lambda (sym val)
  ;; Starting with version 1.4 beta 12 Semantic can globally
  ;; enable `senator-minor-mode'.  So don't override the
  ;; global setting in JDE's buffers.
  (or (and (boundp 'global-senator-minor-mode)
   global-senator-minor-mode)
  t ;;  added by me
  (mapc 
   (lambda (buff)
 (save-excursion   
   (set-buffer buff)
   (senator-minor-mode (if val 1 -1
   (jde-get-java-source-buffers)))
  (set-default sym val)))

which seems to work as expected (although i might have broken senator, but
I don't care about that on my machine). 

Perhaps that helps tracking down the bug (which occurs on my Linux box as
well).

Another bug: Since jde-2.3.3 jde-build-ant-command uses ' chars here
instead of  to enclose the build file name - however ant (or my shell,
which is plain old command.com) does not like that... Would be helpful to
have a custom option for that. 

Michael



Re: cedet-1.0beta1 /Semantic 2.0 and JDEE-2.3.2

2003-12-09 Thread Michael Schierl
On Thu, 6 Nov 2003 13:17:50 -0500, Paul Kinnucan wrote:

 Ed == Ed Soniat [EMAIL PROTECTED] writes:
 
 Ed I tried install JDEE-2.3.2 which claims compatibility with
 Ed Semantic 1.blah.blah or greater.  Semantic 2.0 deleted
 Ed semantic-bnf in Aug/03 or so.
 
 Ed The change log in JDEE is out of date, makes it look like a
 Ed dead project.
 
 Install JDEE 2.3.3beta6 to get semantic 2.0 support and an updated
 change log.

Hmm. JDEE 2.3.3 is supposed to be newer than 2.3.3beta6, isn't it?

When I use that one with cedet-1.0beta1c on emacs-21.3 (Windows), it works
as long as i only edit one file. When I open the second file (or do a M-x
jde-mode RET in the first one), I see 

Wrong type argument: stringp, nil

in the echo area and *messages* buffer shows:

[...]
Setting JDE variables to startup values... [3 times]
wisent-java-tags-lexer: 
Wrong type argument: stringp, nil

debug-on-error does not seem to help. When i remove the condition-case err
clause from the function jde-mode in jde.el, i get this backtrace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  wisent-java-tags-lexer(1 2949 nil nil)
  semantic-lex(1 2949 nil)
  semantic-parse-region-default(1 2949 nil nil nil)
  semantic-parse-region(1 2949)
  semantic-bovinate-toplevel(t)
  byte-code(ÀÁ!,HBÃ(B!,HDÃÅÆÁ(B$,HBÇ(B!,HDÇÅÆÁ(B$,G(B 
[semantic-bovinate-toplevel t semantic-make-local-hook 
semantic-after-toplevel-cache-change-hook add-hook senator-completion-cache-flush-fcn 
nil semantic-after-partial-cache-change-hook] 5)
  senator-minor-mode-setup()
  senator-minor-mode(1)
  (save-excursion (set-buffer buff) (senator-minor-mode (if val 1 -1)))
  (lambda (buff) (save-excursion (set-buffer buff) (senator-minor-mode ...)))(#buffer 
Eins.java)
  mapc((lambda (buff) (save-excursion (set-buffer buff) (senator-minor-mode ...))) 
(#buffer Eins.java))
  (or (and (boundp ...) global-senator-minor-mode) (mapc (lambda ... ...) 
(jde-get-java-source-buffers)))
  (lambda (sym val) (or (and ... global-senator-minor-mode) (mapc ... ...)) 
(set-default sym val))(jde-enable-senator t)
  funcall((lambda (sym val) (or (and ... global-senator-minor-mode) (mapc ... ...)) 
(set-default sym val)) jde-enable-senator t)
  (if (or (get symbol ...) (get symbol ...)) (funcall set symbol val-to-set))
  (let ((val-to-set ...) (set ...)) (if (or ... ...) (funcall set symbol val-to-set)) 
(put symbol (quote customized-value) nil) (put symbol (quote jde-project) nil) 
(jde-put-project symbol default val-to-set))
  (lambda (symbol) (let (... ...) (if ... ...) (put symbol ... nil) (put symbol ... 
nil) (jde-put-project symbol default val-to-set)))(jde-enable-senator)
  mapcar((lambda (symbol) (let (... ...) (if ... ...) (put symbol ... nil) (put symbol 
... nil) (jde-put-project symbol default val-to-set))) 
(jde-gen-session-bean-template jde-gen-beep jde-complete-signature-display 
jde-project-name jde-which-method-format jde-run-classic-mode-vm [cut]
  jde-set-variables-init-value(t)
  (if prj-files (progn (jde-set-variables-init-value) (loop for file in prj-files do 
... ... ... ... ...) (run-hooks ...)) (jde-set-variables-init-value t))
  (let ((prj-files ...)) (if prj-files (progn ... ... ...) 
(jde-set-variables-init-value t)))
  jde-load-project-file()
  (if (and (not ...) jde-project-context-switching-enabled-p) (jde-load-project-file))
  (progn (jde-check-versions) (java-mode) (if (get ... ...) (put ... ... t)) (setq 
major-mode (quote jde-mode)) (setq mode-name JDE) (derived-mode-set-keymap (quote 
jde-mode)) (derived-mode-set-syntax-table (quote jde-mode)) 
(derived-mode-set-abbrev-table (quote jde-mode)) (make-lo[cut]
  jde-mode()
  call-interactively(jde-mode)
  execute-extended-command(nil)
* call-interactively(execute-extended-command)


When I replace cedet-1.0beta1c (by moving the folder out of load path and
the other into load path) by eieio 0.17, semantic 1.4.3 and speedbar
0.14beta4 (the versions i used before upgrading cedet), everything works.

Michael