��Qc@s/ddlZddlZddd��YZdS(i�Nt
AutoExpandcBsReZddgfgZejejdZd�Zd�Zd�Z d�Z
RS( teditsE_xpand Words<<expand-word>>t_cCs|j|_d|_dS(N(ttexttNonetstate(tselfteditwin((s(/sys/lib/python2.7/idlelib/AutoExpand.pyt__init__sc
CsT|jjd�}|jjdd�}|jsE|j�}d}nB|j\}}}}||ksr||kr�|j�}d}n|s�|jj�dS|j�}|jjdt|�d�||} |dt|�}|dkr|jj�n|jj d| �|jjd�}|jjdd�}||||f|_dS(Ntinsertsinsert linestartsinsert lineenditbreaksinsert - %d charsi(
RtindextgetRtgetwordstbelltgetprevwordtdeletetlenR (
Rteventt curinserttcurlinetwordsRR tlinetwordtnewword((s(/sys/lib/python2.7/idlelib/AutoExpand.pytexpand_word_events.
c Cs-|j�}|sgS|jjdd�}tjd|d|�}~|jjdd�}tjd|d|�}~|r�|r�gSg}i}|j�x:|D]2}|j|�r�q�n|j|�|||<q�Wx:|D]2}|j|�rq�|j|�|||<q�|j|�|S(Ns1.0sinsert wordstarts\bs\w+\bsinsert wordendtend(RRRtretfindalltreversetappend( RRtbeforetwbeforetaftertwafterRtdicttw((s(/sys/lib/python2.7/idlelib/AutoExpand.pyR
0s4
cCs]|jjdd�}t|�}x1|dkrT||d|jkrT|d}q$W||S(Nsinsert linestartR ii(RRRt wordchars(RRti((s(/sys/lib/python2.7/idlelib/AutoExpand.pyRNs
&(sE_xpand Words<<expand-word>>(t__name__t
__module__tmenudefststringt
ascii_letterstdigitsR%RRR
R(((s(/sys/lib/python2.7/idlelib/AutoExpand.pyRs ((R*RR(((s(/sys/lib/python2.7/idlelib/AutoExpand.pyt<module>s
|