From: Glenn Morris Date: Tue, 15 Nov 2016 22:14:27 +0000 (-0500) Subject: * src/emacs.c (sort_args): Warn about multiple matches. X-Git-Tag: emacs-26.0.90~1324 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9ed2502878d16ed7f20e8b4817e1eed963468de7;p=emacs.git * src/emacs.c (sort_args): Warn about multiple matches. --- diff --git a/src/emacs.c b/src/emacs.c index b74df21196a..75328c5e3e0 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1870,9 +1870,13 @@ sort_args (int argc, char **argv) fatal ("Option '%s' requires an argument\n", argv[from]); from += options[from]; } - /* FIXME When match < 0, shouldn't there be some error, - or at least indication to the user that there was a - problem? */ + else if (match == -2) + { + /* This is an internal error. + Eg if one long option is a prefix of another. */ + fprintf (stderr, "Option '%s' matched multiple standard arguments\n", argv[from]); + } + /* Should we not also warn if there was no match? */ } done: ; }