#!/bin/tcsh

setenv target /etc/sysconfig/ime
if (-f $target ) then
    foreach _line_ ("`/bin/cat $target`")
	eval `echo $_line_ | /bin/sed -e 's|=C$|=en_US|g' -e 's|\([^#=]*\)=\(.*\)|setenv \1 \2|'`
    end
    unset _line_
endif

setenv target ${HOME}/.vine/system/ime
if (-f $target ) then
    foreach _line_ ("`/bin/cat $target`")
	eval `echo $_line_ | /bin/sed -e 's|=C$|=en_US|g' -e 's|\([^#=]*\)=\(.*\)|setenv \1 \2|'`
    end
    unset _line_
endif

unsetenv target

if ( "$XIM_PROG" == "wnn7" && "$WNN7_FRONT_END" == "xwnmo" ) then
   alias emacs 'env XMODIFIERS=@im=none emacs'
endif
