zshrc: Do not set `localoptions' in `xsource()'
authorFrank Terbeck <ft@grml.org>
Tue, 23 Nov 2010 22:16:16 +0000 (23:16 +0100)
committerFrank Terbeck <ft@grml.org>
Tue, 23 Nov 2010 22:21:44 +0000 (23:21 +0100)
commitdaaf5f50d7bf3664e7f482c5cf797db164db41ef
tree5e3cfed14ee748003597ace176eb1a54ff2d771e
parent70d61836e929b00f5b1ac1397639d993884296a5
zshrc: Do not set `localoptions' in `xsource()'

"emulate -L zsh" sets zsh's option set to the default values of zsh's
native mode. The `-L' causes the options to be set local to the
surrounding function. That makes sense in most cases.

With `xsource()' however, we explicitly want to *allow* changing options
from the files sourced by that function. That's one of the main purposes
of the function.

I took the `emulate' call out entirely because it doesn't make sense
without `-L' in untility functions. I also hardened the function's code
a little when it's run with non-zsh-mode options (like sh_word_split).

Reported-by: Dominic Hopf
debian/changelog
etc/zsh/zshrc