Mohammad,
I believe there are sufficient workarounds that are less complex to manage than you are proposing.
You could have macros in a tiddler and simply transclude them at the top of the tiddler or in a conditional transclude by the ViewTemplate. If the same macros are global and defined elsewhere they will be overwritten with your transcluded macros. For example you could use a tiddler-type field and include a specific macro set only for particular tiddler-types.
You could tag your macros and only include those with a particular tag.
The dumpvariables Macro is helpful with this kind of work and the new variables Operator can allow you to test if a variable exists and if not do something including transclude a tiddler containing "local macros".
If you wanted you could have in each tiddler a transclude-macros-list field that if present will transclude the named tiddlers containing the local macros (may need some backend work).
Regards
Tony