From 95889848e895a3da6a97531b4e778dfaec185b72 Mon Sep 17 00:00:00 2001 From: Adrian Robert Date: Tue, 5 Aug 2008 17:33:05 +0000 Subject: [PATCH] emacs.c (main): Under NS, set working dir to HOME when get a 'psn' argument. --- src/ChangeLog | 2 +- src/emacs.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ce5e7a3a04a..73f93df544f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,6 @@ 2008-08-04 Adrian Robert - * emacs.c (main): Under NS, set working dir to $HOME when get a "psn" + * emacs.c (main): Under NS, set working dir to HOME when get a "psn" argument. 2008-08-05 Juanma Barranquero diff --git a/src/emacs.c b/src/emacs.c index 0f9d3fd5554..21c57f045df 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1337,10 +1337,9 @@ main (int argc, char **argv) skip_args += 1; chdir (getenv ("HOME")); } - else + else if (skip_args+1 < argc && !strncmp(argv[skip_args+1], "-psn", 4)) { - if (skip_args+1 < argc && !strncmp(argv[skip_args+1], "-psn", 4)) - skip_args += 2; + skip_args += 2; chdir (getenv ("HOME")); } } -- 2.39.2