How to add to history from within a macro?

I would like to add commands to the active history (not just to the .root_hist file) from within a macro, so that in my current interactive session I can scroll back and rerun or even edit commands built by a macro.

I regularly use gROOT->ProcessLine() inside macros, but this doesn’t make history entries.

I see in clib/src/Getline.c there is a function Gl_histadd(), which is used by TRint::HandleTermInput(), but I can’t figure out how to access Gl_histadd from my own macros.

Any suggestions?

Hi,

I’ve added in the cvs version the possibility to call Gl_histadd() from macros.

Cheers, Fons.