diff options
| author | Richard M. Stallman | 1995-04-30 23:50:15 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-04-30 23:50:15 +0000 |
| commit | 221cbd7d497d6e24e119b607099134bd22fc4a77 (patch) | |
| tree | 55cc4f1b3b367f03743a74a5a4d01a5b4d7992ba | |
| parent | ab30fc8aec9549c1bd96c39bf46747bd117bc957 (diff) | |
| download | emacs-221cbd7d497d6e24e119b607099134bd22fc4a77.tar.gz emacs-221cbd7d497d6e24e119b607099134bd22fc4a77.zip | |
(main): Delete duplicate code for -version.
(standard_args): Add -help and -version.
| -rw-r--r-- | src/emacs.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/emacs.c b/src/emacs.c index 5f5251c238d..686a784e10c 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -927,16 +927,6 @@ Usage: %s [-t term] [--terminal term] [-nw] [--no-windows] [--batch]\n\ | |||
| 927 | tzset (); | 927 | tzset (); |
| 928 | #endif /* defined (sun) || defined (LOCALTIME_CACHE) */ | 928 | #endif /* defined (sun) || defined (LOCALTIME_CACHE) */ |
| 929 | 929 | ||
| 930 | /* Handle the GNU standard option --version. */ | ||
| 931 | if (argmatch (argv, argc, "-version", "--version", 3, NULL, &skip_args)) | ||
| 932 | { | ||
| 933 | Lisp_Object ver; | ||
| 934 | ver = call0 (intern ("emacs-version")); | ||
| 935 | if (STRINGP (ver)) | ||
| 936 | printf ("%s\n", XSTRING (ver)->data); | ||
| 937 | exit (0); | ||
| 938 | } | ||
| 939 | |||
| 940 | /* Enter editor command loop. This never returns. */ | 930 | /* Enter editor command loop. This never returns. */ |
| 941 | Frecursive_edit (); | 931 | Frecursive_edit (); |
| 942 | /* NOTREACHED */ | 932 | /* NOTREACHED */ |
| @@ -957,6 +947,8 @@ struct standard_args | |||
| 957 | 947 | ||
| 958 | struct standard_args standard_args[] = | 948 | struct standard_args standard_args[] = |
| 959 | { | 949 | { |
| 950 | { "-version", "--version", 110, 0 }, | ||
| 951 | { "-help", "--help", 110, 0 }, | ||
| 960 | { "-nl", "--no-shared-memory", 100, 0 }, | 952 | { "-nl", "--no-shared-memory", 100, 0 }, |
| 961 | #ifdef VMS | 953 | #ifdef VMS |
| 962 | { "-map", "--map-data", 100, 0 }, | 954 | { "-map", "--map-data", 100, 0 }, |