Commit a9f8deec authored by Jan Djärv's avatar Jan Djärv
Browse files

* emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,

chdir to HOME.

Fixes: debbugs:15607
parent 87756ca9
2013-10-20 Jan Djärv <jan.h.d@swipnet.se>
* emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
chdir to HOME (bug#15607).
* nsterm.m (Qcocoa, Qgnustep): New variables.
(syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
(ns_get_color): Make selection color work for GNUStep also.
......
......@@ -1187,10 +1187,13 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
if (!noninteractive)
{
#ifdef NS_IMPL_COCOA
if (skip_args < argc)
/* Started from GUI? */
/* FIXME: Do the right thing if getenv returns NULL, or if
chdir fails. */
if (! inhibit_window_system && ! isatty (0))
chdir (getenv ("HOME"));
else if (skip_args < argc)
{
/* FIXME: Do the right thing if getenv returns NULL, or if
chdir fails. */
if (!strncmp (argv[skip_args], "-psn", 4))
{
skip_args += 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment