Mac OS X Command Line Options Bug Fix

Andrew Choi <[email protected]> Sat, 10 Aug 2002 18:44:26 -0600
Newsgroups gmane.emacs.macintosh.devel
Message-ID <[email protected]>
Hello Everyone,

I've checked in the following patch to the CVS that allows Emacs to be
started correctly as a GUI application from the terminal on Mac OS X.
Therefore command line options can now be passed to Emacs.  The OS X
loader still requires a pathname to the executable in the bundle be
typed to the shell for Emacs to correctly find its resources.

Now that this problem is solved, I will soon be changing
src/makefile.in to install the executable only at one place (within
the application bundle in its usual place, which is placed in say
/Applications/ or some other location specified by the user).  The
`executable' in $prefix/bin/ will really be just something like the
following script:

  #!/bin/sh
  /Applications/Emacs.app/Contents/MacOS/Emacs $*

When invoked from the command line, it will start a GUI or terminal
version depending on whether the -nw switch is used.

Of course one can still double-click on the application bundle in the
Finder to start Emacs.

I invite everyone to test this patch.

Andrew.
-----
2002-08-10  Andrew Choi  <[email protected]>

        * mac.c (sys_select) [MAC_OSX]: New function.

        * macterm.c (MakeMeTheFrontProcess): New function.
        (mac_initialize): Call MakeMeTheFrontProcess.

        * s/darwin.h: Define select to sys_select.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf