--- share/bin/oz.in.orig	2006-06-15 18:43:30.000000000 +0200
+++ share/bin/oz.in	2006-06-15 18:50:42.000000000 +0200
@@ -60,10 +60,10 @@
 	if test -z "${OZEMACS}"
 	then
 	    IFS="${IFS=   }"; saveifs="$IFS"; IFS="$IFS:"
-	    for name in emacs xemacs lemacs; do
-		for dir in $PATH; do
+	    for name in "Aquamacs Emacs" Emacs emacs xemacs lemacs; do
+		for dir in "/Applications/Aquamacs" "/Applications/MacPorts/Emacs.app/Contents/MacOS" /Applications/Emacs.app/Contents/MacOS $PATH; do
 		    test -z "$dir" && dir=.
-		    if test -f $dir/$name; then
+		    if test -f "$dir/$name"; then
 			# Not all systems have dirname.
 			OZEMACS=$dir/$name
 			break 2

