At 08:46 AM 10/10/00 +0200, Gian Uberto Lauri wrote:
>>>>>> "PK" == Paul Kinnucan <[EMAIL PROTECTED]> writes:
>
>PK> This is the only symbol name change that I can recall making since the 
>PK> JDE's inception three years ago. Further, accommodating the name change 
>PK> requires only a single search-and-replace operation in the
html-help-mode 
>PK> source. So I don't understand why this one small change is causing such 
>PK> concern.
>
>No mean to flame anybody.
>
>But I can't do a simple  search'n'replace, I have to add a conditional
>sexp.  And as I  said, I am all but an Emacs  Lisp wizard, so the more
>code I add the more  placeholders for errors appear. Consider that JDE
>is  not the  oly  Java mode  I  have to  support,  since the  standard
>distribution includes another. If someone can clean up this code, I'll
>appreciate it a lot:
>
>(cond (html-helper-mode-uses-JDE
>; That's the code with the old name. How can know JDE version here ?
>       (cond 
>       (jde-entering-java-buffer-hooks
>        (add-hook 'jde-entering-java-buffer-hooks 
>                  'html-script-release-setup))
>       (t (setq jde-entering-java-buffer-hooks 
>                'html-script-release-setup))))
>       (t 
>       (cond 
>        (java-mode-hook
>         (add-hook 'java-mode-hook 
>                   'html-script-release-setup))
>        (t (setq java-mode-hook 
>                 'html-script-release-setup)))))
>
>BTW.
>
>html-helper-mode is a kluge that  uses mode switching. It uses an hook
>in the  sripting-specific-mode (c/java/visual basic) to  setup a local
>key binding to switch back to html-helper-mode. Is it right to use for
>this purpose  jde-entering-java-buffer-hook ? Thank you very much!

Setting up the local key binding everytime a user switches to a Java/JDE
source buffer is unnecessary. You should only need to do this when the
user opens the Java source file. When the user opens a Java source file,
Emacs invokes the jde-mode function. That last thing the jde-mode function
invokes is the jde-mode hook functions. So the jde-mode-hook variable is
the appropriate variable to set. Your code seems unnecessarily complex.
Why isn't this 

(if  html-helper-mode-uses-JDE
  (add-hook 'jde-mode-hook 'html-script-release-setup))

sufficient?

- Paul

Reply via email to