SuJiKiNen / mini-wubi

A Simple Chinese Wubi Input Method Inside Emacs
0 stars 0 forks source link

buffer local problem #2

Open SuJiKiNen opened 7 years ago

SuJiKiNen commented 7 years ago

The variables is not buffer local currently ,which means that activated the mini-wubi would affect other buffer's mini-wubi behaviour,need to find a way to maintain a buffer local quail-map.

SuJiKiNen commented 7 years ago

quail-current-package is buffer-local variable made by quail package,but the value is a list,so in different buffer,activating the input method,the quail-current-package point to same object,to make it buffer local,I make a whole copy of quail-current-package,this is a handy way,which means that for the future feature,like editing the quail-map and save it back to quail-rules file,will not immediately affecting on other buffer,cause everyone is individual.

SuJiKiNen commented 7 years ago

the mini-wubi-setup must call after thetoggle-input-method,because activate the input method,will set set quail-current-package,the value set by quail,is not truly buffer-local,call mini-wubi-setup to make it truly buffer-local variable.