Mercurial > emacs
changeset 16091:d76a0697d12e
(sort_args): Don't rearrange any args that follow "--".
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 03 Sep 1996 21:48:13 +0000 |
parents | cf84933860ed |
children | 439578110829 |
files | src/emacs.c |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/emacs.c Tue Sep 03 21:46:07 1996 +0000 +++ b/src/emacs.c Tue Sep 03 21:48:13 1996 +0000 @@ -1114,6 +1114,7 @@ int to = 1; int from; int i; + int end_of_options = argc; /* Categorize all the options, and figure out which argv elts are option arguments. */ @@ -1126,6 +1127,19 @@ int match, thislen; char *equals; + /* If we have found "--", don't consider + any more arguments as options. */ + if (argv[from][1] == '-') + { + /* Leave the "--", and everything following it, at the end. */ + for (; from < argc; from++) + { + priority[from] = -100; + options[from] = -1; + } + break; + } + /* Look for a match with a known old-fashioned option. */ for (i = 0; i < sizeof (standard_args) / sizeof (standard_args[0]); i++) if (!strcmp (argv[from], standard_args[i].name))