I'm running gnuplot 4.6.3 on a Mac (gnuplot was installed via macports) and found the following unexpected behaviour:
When loading files with macros, it appears that macros are evaluated only up to a depth of one. Prepare the followig two .gp files
macro_test_1.gp: set macro macro_test="sin(x)" func="@macro_test" macro_test_2.gp: plot @func
and run
load macro_test_1.gp load macro_test_2.gp
on the interactive gnuplot prompt.
Observed behaviour: "macro_test_2.gp", line 1: invalid character @
Expected behaviour: A plot of sin(x) in the current terminal.
The same error is given by gnuplot if one puts the 'plot @func' command in the first file. Though, that is probably not expected to expand properly, since macros can not be defined and used on the same line?
Issuing a 'plot @func' on the interactive prompt works as expected.
It works as expected if you simply say
plot @func
directly rather than trying to load that same command from a file.
So I agree there is a bug or strangeness shown by this test case, but it has something to do with macro expansion inside a load command rather than a more general problem with macros of depth > 1.