diff options
| author | Glenn Morris | 2016-11-15 17:14:27 -0500 |
|---|---|---|
| committer | Glenn Morris | 2016-11-15 17:14:27 -0500 |
| commit | 9ed2502878d16ed7f20e8b4817e1eed963468de7 (patch) | |
| tree | 3af8db8258c59d61346f5922fbaeac593a3c5833 /src | |
| parent | 52092f0a85ee77d0d996f6bb148b9dc5e70640db (diff) | |
| download | emacs-9ed2502878d16ed7f20e8b4817e1eed963468de7.tar.gz emacs-9ed2502878d16ed7f20e8b4817e1eed963468de7.zip | |
* src/emacs.c (sort_args): Warn about multiple matches.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 10 |
1 files changed, 7 insertions, 3 deletions
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) | |||
| 1870 | fatal ("Option '%s' requires an argument\n", argv[from]); | 1870 | fatal ("Option '%s' requires an argument\n", argv[from]); |
| 1871 | from += options[from]; | 1871 | from += options[from]; |
| 1872 | } | 1872 | } |
| 1873 | /* FIXME When match < 0, shouldn't there be some error, | 1873 | else if (match == -2) |
| 1874 | or at least indication to the user that there was a | 1874 | { |
| 1875 | problem? */ | 1875 | /* This is an internal error. |
| 1876 | Eg if one long option is a prefix of another. */ | ||
| 1877 | fprintf (stderr, "Option '%s' matched multiple standard arguments\n", argv[from]); | ||
| 1878 | } | ||
| 1879 | /* Should we not also warn if there was no match? */ | ||
| 1876 | } | 1880 | } |
| 1877 | done: ; | 1881 | done: ; |
| 1878 | } | 1882 | } |