bridge/class-master/depend/pari/src/gp/gp_rl.c
/* To allow insertion of () with a point in between. */
To allow insertion of () with a point in between.
To allow insertion of () with a point in between .
static int
pari_rl_matched_insert(int count, int key)
{
  int i = 0, ret;
  if (count <= 0)
    return change_state("electric parens", DO_MATCHED_INSERT, count);
  while (paropen[i] && paropen[i] != key) i++;
  if (!paropen[i] || !(GP_DATA->readline_state & DO_MATCHED_INSERT) || GP_DATA->flags & gpd_EMACS)
    return ((RLCI)rl_insert)(count,key);
  rl_begin_undo_group();
  ((RLCI)rl_insert)(count,key);
  ret = ((RLCI)rl_insert)(count,parclose[i]);
  rl_point -= count;
  rl_end_undo_group(); return ret;
}
static int pari_rl_matched_insert ( int count , int key ) { int i = 0 , ret ; if ( count <= 0 ) return change_state ( " " , DO_MATCHED_INSERT , count ) ; while ( paropen [ i ] && paropen [ i ] != key ) i ++ ; if ( ! paropen [ i ] || ! ( GP_DATA -> readline_state & DO_MATCHED_INSERT ) || GP_DATA -> flags & gpd_EMACS ) return ( ( RLCI ) rl_insert ) ( count , key ) ; rl_begin_undo_group ( ) ; ( ( RLCI ) rl_insert ) ( count , key ) ; ret = ( ( RLCI ) rl_insert ) ( count , parclose [ i ] ) ; rl_point -= count ; rl_end_undo_group ( ) ; return ret ; }
To allow insertion of () with a point in between.
To allow insertion of () with a point in between .