anchor.diff:    //makes no sense to auto-close brackets in overwrite mode
     if Ed.ModeOverwrite then exit;
   
  -  if CharBegin='(' then CharEnd:= ')' else
  -   if CharBegin='[' then CharEnd:= ']' else
  -    if CharBegin='{' then CharEnd:= '}' else
  -     if CharBegin='"' then CharEnd:= '"' else
  -      if CharBegin='''' then CharEnd:= '''' else
  -       if CharBegin='`' then CharEnd:= '`' else
  -        if CharBegin='~' then CharEnd:= '~' else
  -         if CharBegin='*' then CharEnd:= '*' else
  -          if CharBegin='#' then CharEnd:= '#' else
  -           if CharBegin='<' then CharEnd:= '>' else
  -            exit;
  +  CharEnd:= EditorBracket_GetPairForOpeningBracketOrQuote(CharBegin);
  +  if CharEnd=#0 then exit;
   
     //cancel vertical selection
     Ed.DoSelect_ClearColumnBlock;
  
positive.code: type
    TATEditorGetTokenKind = function(Ed: TATSynEdit; AX, AY: integer): TATTokenKind of object;
  
  function EditorBracket_GetPairForClosingBracketOrQuote(ch: char): char;
  procedure EditorBracket_ClearHilite(Ed: TATSynEdit);
  procedure EditorBracket_FindBoth(Ed: TATSynEdit;
    var PosX, PosY: integer;
  
negative.code:   iCaret: integer;
  begin
    Result:= false;
  
    CharOpening:= EditorBracket_GetPairForClosingBracketOrQuote(CharClosing);
    if CharOpening=#0 then exit;
    if Pos(CharOpening, Ed.OptAutoCloseBrackets)=0 then exit;
  
    for iCaret:= Ed.Carets.Count-1 downto 0 do
    begin
      Caret:= Ed.Carets[iCaret];
  