To enable the debug menu, type in the Terminal application:
> defaults write com.apple.safari IncludeDebugMenu 1
To use Yahoo instead of Google in the search bar, you can hack the Safari binary, for instance with the
vi text editor:
> vi /Applications/Safari.app/Contents/MacOS/Safari vi>/%@.google.gom
Then replace these strings (must be the exactly the same length!):
[Update 2014-12-25] NB. Since GateKeeper was introduced, you can no longer hack the binary. Safari would no longer be allowed to launch.