Watch this interesting thread on the emacs newsgroup. Note how complicated the request sounds and the wealth of simpler solutions that follow. It's instructive to know that you don't need to use macros or fiddle around with any settings in elisp to do all of this.
My recommendation is that, if you have frequently want to access a particular directory, use bookmarks. I posted about them here and here.
My recommendation is that, if you have frequently want to access a particular directory, use bookmarks. I posted about them here and here.