Hi Paul, [...] > > >> ;; to a buffer belonging to another. > > >> (make-local-hook 'post-command-hook) > > > > >Hmm, I don't think I need the above form because the add-hook form below > > >makes the variable local anyway. > > > > Indeed. > > I have removed the redundant form in the JDEE sources. > > > > > > > (add-hook 'post-command-hook > > > > 'jde-detect-java-buffer-activation nil t) [...]
I am not sure it is correct to remove the call to `make-local-hook'. It is at least necessary to preserve compatibility with XEmacs' version of `add-hook' (perhaps `add-hook' in version of GNU Emacs older than 21 are affected too). Here is what the doc string of `add-hook' says about the LOCAL argument, on my stock XEmacs 21.4.15: "The optional fourth argument, LOCAL, if non-nil, says to modify the hook's buffer-local value rather than its default value. This makes no difference if the hook is not buffer-local. To make a hook variable buffer-local, always use `make-local-hook', not `make-local-variable'." Clearly, the LOCAL argument is ignored, unless `make-local-hook' has been called to make the hook buffer local! Hope it helps. Sincerely, David
