anchor.diff:  
         SetLength(Params, 0);
         DoPyEvent(F.Ed1, cEventOnOpen, Params);
  -      if F.IsText and (F.LexerName[F.Ed1]='') then
  -      begin
  -        DoPyEvent(F.Ed1, cEventOnOpenNone, Params);
  -        UpdateStatus;
  -      end;
  +
  +      if IsFilenameForLexerDetecter(AFileName) then
  +        if F.IsText and (F.LexerName[F.Ed1]='') then
  +        begin
  +          DoPyEvent(F.Ed1, cEventOnOpenNone, Params);
  +          UpdateStatus;
  +        end;
   
         if AFileName2<>'' then
         begin
  
positive.code:   MsgStatus(S);
  end;
  
  function TfmMain.DoFileOpen(AFileName, AFileName2: string; APages: TATPages;
    const AOptions: string): TEditorFrame;
  var
  
negative.code: 
    SetLength(Params, 0);
    DoPyEvent(F.Ed1, cEventOnOpen, Params);
  
    if IsFilenameForLexerDetecter(AFileName) then
      if F.IsText and (F.LexerName[F.Ed1]='') then
        DoPyEvent(F.Ed1, cEventOnOpenNone, Params);
  
    if AFileName2<>'' then
      DoPyEvent(F.Ed2, cEventOnOpen, Params);
  
  