emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 9ed2502: * src/emacs.c (sort_args): Warn about mult


From: Glenn Morris
Subject: [Emacs-diffs] master 9ed2502: * src/emacs.c (sort_args): Warn about multiple matches.
Date: Tue, 15 Nov 2016 22:14:41 +0000 (UTC)

branch: master
commit 9ed2502878d16ed7f20e8b4817e1eed963468de7
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    * src/emacs.c (sort_args): Warn about multiple matches.
---
 src/emacs.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/emacs.c b/src/emacs.c
index b74df21..75328c5 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: ;
        }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]