compile.el and kill-all-local-variables

David A. Panariti davep.xemacs at meduseld.net
Mon Jul 23 11:01:47 EDT 2007


>>>>> "Marcus" == Marcus Harnisch <marcus.harnisch at gmx.net> writes:
   Marcus> Hi there

   Marcus> I would like to have the variable
   Marcus> `compilation-error-regexp-systems-list' buffer-local. I don't see
   Marcus> much of a point to drag all those error parsing regexps across my
   Marcus> entire XEmacs.
I'm not sure what you mean by "dragging," but it is just one symbol in a
global table referencing a single copy of the variable.
I local variables actually have a higher cost associated with them due to the
extra meta-data.  Also, you will get an extra copy in any buffer that does set
it (depending on how it is set.)  In any I would imagine that there is at
least a symbol table's worth a meta-data used by the buffer-local code.

   Marcus> However, in `compilation-mode' there is a nasty
   Marcus> call to kill-all-local-variables rendering my efforts useless.

   Marcus> Does anyone know why this is in there? Doesn't occur to
   Marcus> me. 
I believe it is SOP for minor modes.  Makes sure there's no goop left over
from the previous incarnation.
You can make the buffer-local survive `kill-all-local-variables' by making it
permanent, thus:
(put 'compilation-error-regexp-systems-list 'permanent-local t)

   Marcus> Unfortunately there are some loosely specified error regexps
   Marcus> that do a catch all, shadowing some of my own definitions.
I'd have to poke around in the code to see how the regexps are traversed.
Are you adding yours, w/append or cons?  In either case, try the other.

   Marcus> Actually there is an interesting email, which might provide a
   Marcus> clue, to be found here
   Marcus> http://osdir.com/ml/emacs.sources/2004-03/msg00031.html

   Marcus> Regards
   Marcus> -- Marcus

   Marcus> _______________________________________________
   Marcus> XEmacs-Beta mailing list
   Marcus> XEmacs-Beta at xemacs.org
   http> //calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta

--
       /  Turn the other cheek.
davep (|)                 -- Jesus Christ
       /  Unless you're a NeoCon.
                          -- NT Signing statement by GWB



More information about the XEmacs-Beta mailing list