Commit 947f5e01 authored by Jim Meyering's avatar Jim Meyering Committed by Chong Yidong

* emacs.c (argmatch): Don't treat "--" as "--chdir".

parent 43207249
2010-10-24 Jim Meyering <jim@meyering.net>
* emacs.c (argmatch): Don't treat "--" as "--chdir".
2010-10-24 Glenn Morris <rgm@gnu.org> 2010-10-24 Glenn Morris <rgm@gnu.org>
* w16select.c (syms_of_win16select) <selection-coding-system>: * w16select.c (syms_of_win16select) <selection-coding-system>:
......
...@@ -829,13 +829,14 @@ main (int argc, char **argv) ...@@ -829,13 +829,14 @@ main (int argc, char **argv)
printf ("see the file named COPYING.\n"); printf ("see the file named COPYING.\n");
exit (0); exit (0);
} }
if (argmatch (argv, argc, "-chdir", "--chdir", 2, &ch_to_dir, &skip_args))
if (chdir (ch_to_dir) == -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)); fprintf (stderr, "%s: Can't chdir to %s: %s\n",
exit (1); argv[0], ch_to_dir, strerror (errno));
} exit (1);
}
#ifdef HAVE_PERSONALITY_LINUX32 #ifdef HAVE_PERSONALITY_LINUX32
......
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