// -*- ASCII:EDT -*-
// Auto Response to: \?ref{?},,

 Backspace;
 Backspace;
 CharLeft;
 FindInString("%L","[\{ ,]", 0,1,1111,%c-1);
 FindInString("%L","[\}]", 0,2,1011,%!1);
 ExtractByIndex(2,"%L",%!1+1,%!0-1);
 GlobalMark;
 FindInString("%L","\", 0,1,1110,%c-1);
 GotoCol(%!0+1);
 Mark(0);
 GlobalReturn;
 SelectFromMark;
 TrackCaret;
 GlobalMark;
 SaveSort;
 SetSort(1,1,1,-1,1,1);
 // GDIPopup("Page","Caption",Refresh,Sort,Track_onClick,Track_onDblClick,OK_onDblClick:0..1,
 //   "Selected Item", "Filter String",Remove_Filter:0..1,Show_Buttons:-1..1,
 //   Extended_Items:0..1,
 //   List_Separator_Mode: 0..2, "Separator_Char");
 // F? Keys: Track;  Shift+F? Keys: Return  [F1..F24]
 GDIPopup('Label','Labels',0,1,0,1,0,'%!2','',0,0,0,1,',');
 IfOK(!"RestoreSort;GlobalReturn;SetSel(0);>
   IfStr('%!2','','>','LetReg(2,'','');');Ins('%!2%?');>
   IfStr('%?','','>','CharRight;');",>
   "RestoreSort;GlobalReturn;SetSel(0);");
 TrackCaret;
End;
