(this post came out longer than what I thought it would )
In Scheme a function call is expressed as a list
(f a b c)
is the function f
applied to the arguments a
b
and c
.
a
b
and c
can also be expressions, that Scheme needs to evaluate, and they are generally made in the same way:
either a function call that starts with a parenthesis and the name of the function, followed by arguments
or so-called “atoms”, i.e. elementary data, which are numbers, strings or symbols (more on symbols later).
Scheme then proceeds by substituting inside the parentheses the value of each expression in place of the expression, then evaluates the expression that results out of this, till it has evaluated everything up to the outer parentheses.
(or a b c ...)
is the “or” statement that exists in every language (without entering into details that are not essential here), so you with your code you are adding a new clause to the or (a new case, which if true will make the whole expression true). and
is “and” 
Both “or” and “and” are expressed with the operator first, like all Scheme functions (e.g. to do 1+1 in Scheme you must do (+ 1 1)).
The apostrophe before the words “eqref” and “inactive” tells Scheme not to evaluate those expressions, but to repeat them. So the result of the Scheme code 'eqref
is the symbol eqref
, and the result of 'inactive
is the symbol inactive
.
TeXmacs recognizes both symbols as part of its syntax.
The point of defining parts of trees with a symbol instead than with a string (e.g eqref
instead of "eqref"
) is that by the way strings and symbols are defined it is quicker to check that two symbols are equal than to check that two strings are equal; I have a vague understanding of why this is the case, but so vague that I will not try to write it down … perhaps someone else will be able to explain it (it depends on how strings and symbols are saved in the computer’s memory as far as I understood).
With this I have not defined what is a symbol :-). I will do it when I will understand it 
Forward with the code.
I did not investigate what tree-outer
and focus-tree
do but I guessed it: (tree-outer t)
returns the tree of which t
is a branch. (focus-tree)
returns the current focus
, which is determined by the cursor (just guesses, but in this code they worked).
I also guessed that tree-is?
checks the first element of the tree (first argument) against the second argument. So (tree-is? (focus-tree) 'eqref)
is the function tree-is?
applied to the two arguments (focus-tree)
and 'eqref
.
Putting together a few pieces:
(tree-is? (focus-tree) 'eqref)
- we have to evaluate the function
tree-is?
with the arguments (focus-tree)
and 'eqref
- as a first step we evaluate the arguments
-
(focus-tree)
will give as a result a list (which represents the tree at focus, let us not enter into this), let us call it focus-list
for our example
-
'eqref
evaluates to the symbol eqref
, which Scheme knows how to handle, let us call it #eqref
in this example to remind ourselves that it is an expression which is already evaluated and it gave a symbol as a result of the evaluation (regardless of whether this notation has already another meaning in Scheme, which I do not know)
- now Scheme evaluates
(tree-is? focus-list #eqref)
, and substitutes the result of the evaluation in its place
And so on, till the outer parentheses.