Hello my second question here might be very hard.

I am asking for something "magical", if i define a function g and i call it inside a function f, how can g have information about the outer function f?

To be more precise: Suppose there is a unknown number of functions {f1,f2,f3,...}, how can g know in wich Function it was evaluated?

Pseudocode:

 f1[g] "--inside-of-g-->" f1
 f3[g] "--inside-of-g-->" f3
 
I have an Idear how to work on this problem, but it works not in every case.

EDID:

ok, i wanted to reduce my problem to the relevant point, but i can also explain you, what i exactly want to do with it.

I want to build up a function myTicks[plotRange] that generates Axes-Ticks for a Plot the way i want. My first function works like this:

 Plot[Sin[x], {x,0,10}, Ticks->{myTicks[{0,10}, StepSize-> 0.5], Automatic}]

Now i want to change the plotRange of myTicks to an optional argument like:

 MyTicks[plotRange_:Automatic, opt:OptionsPattern[]] := Module[{}, If[plotRange =!= Automatic, Range[plotRange〚1〛, plotRange〚2〛, OptionValue[StepSize], (* magical lookup for the PlotRange of the Plot *)]]

So now it should be possible to call myTicks without giving the actual PlotRange of the outer Plotfunction.

I hope that i did not confuse you more.