Back to index

texmacs  1.0.7.15
Functions | Variables
edit_dynamic.cpp File Reference
#include "edit_dynamic.hpp"
#include "tree_analyze.hpp"

Go to the source code of this file.

Functions

static bool contains_table_format (tree t, tree var)
static tree remove_changes_in (tree t, string var)

Variables

static bool env_locked = false
static bool env_in_source = false

Function Documentation

static bool contains_table_format ( tree  t,
tree  var 
) [static]

Definition at line 73 of file edit_dynamic.cpp.

                                         {
  // FIXME: this should go into the DRD
  if (is_atomic (t)) return false;
  else {
    int i, n= N(t);
    for (i=0; i<n; i++)
      if (contains_table_format (t[i], var))
       return true;
    return is_func (t, TFORMAT) && (t[N(t)-1] == tree (ARG, var));
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static tree remove_changes_in ( tree  t,
string  var 
) [static]

Definition at line 361 of file edit_dynamic.cpp.

                                       {
  if (is_atomic (t)) return t;
  else if (is_func (t, WITH)) {
    int i, n=N(t), k=(n-1)>>1;
    if (k==1) {
      tree r= remove_changes_in (t[2], var);
      if (t[0] != var) r= tree (WITH, t[0], t[1], r);
      return simplify_correct (r);
    }
    tree r (WITH);
    for (i=0; i<k; i++)
      if (t[i<<1] != var) r << t[i<<1] << t[(i<<1)+1];
    r << remove_changes_in (t[i<<1], var);
    return simplify_correct (r);
  }
  else if (is_format (t) || is_func (t, SURROUND)) {
    int i, n= N(t);
    tree r (t, n);
    for (i=0; i<n; i++)
      r[i]= remove_changes_in (t[i], var);
    return simplify_correct (r);
  }
  else return t;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

bool env_in_source = false [static]

Definition at line 27 of file edit_dynamic.cpp.

bool env_locked = false [static]

Definition at line 26 of file edit_dynamic.cpp.