Mercurial > emacs
changeset 111143:42dfe6f887b0
* emacs.c (argmatch): Don't treat "--" as "--chdir".
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 24 Oct 2010 12:00:57 -0400 |
parents | 947164fbfa46 |
children | f349e65969e5 |
files | src/ChangeLog src/emacs.c |
diffstat | 2 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sun Oct 24 11:46:21 2010 -0400 +++ b/src/ChangeLog Sun Oct 24 12:00:57 2010 -0400 @@ -1,3 +1,7 @@ +2010-10-24 Jim Meyering <jim@meyering.net> + + * emacs.c (argmatch): Don't treat "--" as "--chdir". + 2010-10-24 Glenn Morris <rgm@gnu.org> * w16select.c (syms_of_win16select) <selection-coding-system>:
--- a/src/emacs.c Sun Oct 24 11:46:21 2010 -0400 +++ b/src/emacs.c Sun Oct 24 12:00:57 2010 -0400 @@ -829,13 +829,14 @@ printf ("see the file named COPYING.\n"); exit (0); } - if (argmatch (argv, argc, "-chdir", "--chdir", 2, &ch_to_dir, &skip_args)) - if (chdir (ch_to_dir) == -1) - { - fprintf (stderr, "%s: Can't chdir to %s: %s\n", - argv[0], ch_to_dir, strerror (errno)); - exit (1); - } + + if (argmatch (argv, argc, "-chdir", "--chdir", 4, &ch_to_dir, &skip_args)) + if (chdir (ch_to_dir) == -1) + { + fprintf (stderr, "%s: Can't chdir to %s: %s\n", + argv[0], ch_to_dir, strerror (errno)); + exit (1); + } #ifdef HAVE_PERSONALITY_LINUX32