[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114730: * emacs.c (main): On Cocoa, if GUI session
From: |
Jan D. |
Subject: |
[Emacs-diffs] trunk r114730: * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty, |
Date: |
Sun, 20 Oct 2013 16:47:47 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114730
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15607
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Sun 2013-10-20 18:47:42 +0200
message:
* emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
chdir to HOME.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/emacs.c emacs.c-20091113204419-o5vbwnq5f7feedwu-241
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-10-20 09:55:25 +0000
+++ b/src/ChangeLog 2013-10-20 16:47:42 +0000
@@ -1,5 +1,8 @@
2013-10-20 Jan Djärv <address@hidden>
+ * 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.
=== modified file 'src/emacs.c'
--- a/src/emacs.c 2013-10-17 03:08:59 +0000
+++ b/src/emacs.c 2013-10-20 16:47:42 +0000
@@ -1187,10 +1187,13 @@
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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114730: * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,,
Jan D. <=