>>>>> "Leon" == Juan Leon Lahoz Garcia <[EMAIL PROTECTED]> writes:
Leon> (like not being able to use jde-stack without
Leon> some tricks, because the jde-run-mode-hook is nil after
Leon> loading a new java file).
I had not realised this! I killed the project reloading
mechanism because I never use it, and so I never realised that it
would effectively prevent jde-stack.el from working.
Leon> I do suppose that I have misunderstand the basic philosophy of
Leon> the way variables are customized for jde-mode. We don't use
Leon> project files because we are several developers using jde
Leon> under the same files (with some changes control) and each one
Leon> has his/her own classpaths/preferences/etc, but maybe the
Leon> solution could be to do the effort to adapt us to start using
Leon> project files.
I think that there is a problem here. As Paul has said
before perhaps the solution is to use custom, but this does not help
for jde-stack, which needs access to this hook if it is to work
properly. I do not particularly want to have to get people to change
the jde-run-mode-hook with custom. An emacs package should just
work...
Perhaps I could suggest that either there be an exclusion
clause added to jde-set-variables-init-value like so...
(defun jde-set-variables-init-value ()
"Set each JDE variable to the value it has at Emacs startup."
(interactive)
(message "Setting JDE variables to startup values...")
(mapcar
(lambda (symbol)
(when
(and (string-match "jde-" (symbol-name symbol))
(not (string-match jde-reset-excluded-variables (symbol-name symbol)))
(get symbol 'custom-type))
(let ((saved-val (get symbol 'saved-value))
(std-val (get symbol 'standard-value))
(set (or (get symbol 'custom-set) 'set-default)))
(if saved-val
(funcall set symbol (eval (car saved-val)))
(funcall set symbol (eval (car std-val)))))))
(jde-symbol-list)))
Probably jde-reset-excluded-variables should include itself,
or things are going to get confusing.
or alternatively a hook should be added to
jde-load-project-file AFTER the variables have been reset. That way
jde-stack could put its hook function back onto jde-run-mode-hook
immediately when it had been removed.
Phil