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