David A. Panariti writes:
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.
The problem is that with a global variable, I end up with lots of
cruft in c-e-r-a that I am not interested in for a given mode.
Let's assume I'd use a variety of languages at the same time. Because
of its global nature, c-e-r-s-l will have to contain entries for all
compilers. All this may end up in a larger number of error regexps
being applied than I need. Worse than the decrease in speed is the
fact that there is a potential that regexps earlier in c-e-r-a
(generated from c-e-r-s-l) would catch text in my output buffer
unintentionally, preventing the actual regexp from matching. The risk
of this happening is higher the more regexps there are, of course.
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)
I will try that as workaround, but don't regard that as a proper
solution to the problem. Next time things don't work for someone, we
will get a new flag `disable-permanent-local', followed by
`overwrite-disable-permanent-local',...
I am of course exaggerating but you get the idea.
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.
They are traversed in order, so I could get away for now just putting
mine in front of something. But again, this is not a proper
solution. I'll now end up depending on the load order of libraries
adding their stuff.
Note that my request for a local variable is also not a perfect
solution, but by minimizing the list of active regexps it can help to
reduce the risk of regexp-shadowing.
Thanks for looking into this
-- Marcus
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta