Hi, Jeff.
I got your personal email. Thanks!
On Fri, Nov 09, 2012 at 01:24:03PM -0500, jeff-xemacs(a)delphioutpost.com wrote:
I've been having trouble with cc based modes for the past year.
After I open a .cc file then every other mode becomes infected with
c-before-change and c-after-change hooks.
c-basic-common-init does the following.
(or (memq 'add-hook-local c-emacs-features)
(make-local-hook 'before-change-functions))
...
(or (memq 'add-hook-local c-emacs-features)
(make-local-hook 'after-change-functions))
So if add-local-hook exists as a feature then we don't call it?
Shouldn't that 'or' be an 'and' or 'if'?
No. The meaning of (memq 'add-hook-local c-emacs-features) is "The LOCAL
parameter to `add-hook' works without first having to call
`make-local-hook'.".
This is the case for all modern GNU Emacsen and XEmacs 21.5, but not
XEmacs 21.4, I think. `make-local-hook' has been removed from Emacs-24,
hence the need to make calling it conditional.
The add-hook-local flag is set (in cc-defs.el) by actually testing the
effect of (add-hook 'x 'y nil t) on a test buffer.
I'm on 21.4.22, but I sort of doubt that matters.
See above.
It would seem that CC Mode has got something wrong with either the buffer
test or the use of `make-local-hook'. Does 'add-hook-local get added to
c-emacs-features in XEmacs 21.4.22? If it does, that is a bug. If it
doesn't, why isn't the call to `make-local-hook' working properly?
I sadly don't have a fully working XEmacs 21.4.22 at the moment. I had
to rebuild it to get rid of TIFF and PNG (whose libraries weren't
compatible any more). I've forgotten how to tell XEmacs (or
./configure?) the location of the package directory. Any chance of a
quick tip from somebody, please?
-jeff
--
Alan Mackenzie (Nuremberg, Germany).
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta