+ if (! NILP (dir_only_p))
+ {
+ [panel setCanChooseDirectories: YES];
+ [panel setCanChooseFiles: NO];
+ }
+
+ block_input ();
+#if defined (NS_IMPL_COCOA) && \
+ MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ if (! NILP (mustmatch) || ! NILP (dir_only_p))
+ [panel setAllowedFileTypes: nil];
+ if (dirS) [panel setDirectoryURL: [NSURL fileURLWithPath: dirS]];
+ if (initS && NILP (Ffile_directory_p (init)))
+ [panel setNameFieldStringValue: [initS lastPathComponent]];
+ else
+ [panel setNameFieldStringValue: @""];
+
+ ret = [panel runModal];
+#else
+ if (NILP (mustmatch) && NILP (dir_only_p))