diff options
Diffstat (limited to 'src/emacs.c')
-rw-r--r-- | src/emacs.c | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/src/emacs.c b/src/emacs.c index 7c0ddf97a01..5babf3af029 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -201,10 +201,10 @@ int initial_argc; static void sort_args (int argc, char **argv); static void syms_of_emacs (void); -/* MSVC needs each string be shorter than 2048 bytes, so the usage +/* C89 needs each string be at most 509 characters, so the usage strings below are split to not overflow this limit. */ -#define USAGE1 "\ -Usage: %s [OPTION-OR-FILENAME]...\n\ +static char const *const usage_message[] = + { "\ \n\ Run Emacs, the extensible, customizable, self-documenting real-time\n\ display editor. The recommended way to start Emacs for normal editing\n\ @@ -215,11 +215,15 @@ read the main documentation for these command-line arguments.\n\ \n\ Initialization options:\n\ \n\ +", + "\ --batch do not do interactive display; implies -q\n\ --chdir DIR change to directory DIR\n\ --daemon start a server in the background\n\ --debug-init enable Emacs Lisp debugger for init file\n\ --display, -d DISPLAY use X server DISPLAY\n\ +", + "\ --no-desktop do not load a saved desktop\n\ --no-init-file, -q load neither ~/.emacs nor default.el\n\ --no-shared-memory, -nl do not use shared memory\n\ @@ -227,14 +231,16 @@ Initialization options:\n\ --no-site-lisp, -nsl do not add site-lisp directories to load-path\n\ --no-splash do not display a splash screen on startup\n\ --no-window-system, -nw do not communicate with X, ignoring $DISPLAY\n\ +", + "\ --quick, -Q equivalent to:\n\ -q --no-site-file --no-site-lisp --no-splash\n\ --script FILE run FILE as an Emacs Lisp script\n\ --terminal, -t DEVICE use DEVICE for terminal I/O\n\ --user, -u USER load ~USER/.emacs instead of your own\n\ -\n%s" - -#define USAGE2 "\ +\n\ +", + "\ Action options:\n\ \n\ FILE visit FILE using find-file\n\ @@ -243,6 +249,8 @@ FILE visit FILE using find-file\n\ --directory, -L DIR add DIR to variable load-path\n\ --eval EXPR evaluate Emacs Lisp expression EXPR\n\ --execute EXPR evaluate Emacs Lisp expression EXPR\n\ +", + "\ --file FILE visit FILE using find-file\n\ --find-file FILE visit FILE using find-file\n\ --funcall, -f FUNC call Emacs Lisp function FUNC with no arguments\n\ @@ -250,9 +258,9 @@ FILE visit FILE using find-file\n\ --kill exit without asking for confirmation\n\ --load, -l FILE load Emacs Lisp FILE using the load function\n\ --visit FILE visit FILE using find-file\n\ -\n" - -#define USAGE3 "\ +\n\ +", + "\ Display options:\n\ \n\ --background-color, -bg COLOR window background color\n\ @@ -260,6 +268,8 @@ Display options:\n\ used for debugging Emacs\n\ --border-color, -bd COLOR main border color\n\ --border-width, -bw WIDTH width of main border\n\ +", + "\ --color, --color=MODE override color mode for character terminals;\n\ MODE defaults to `auto', and\n\ can also be `never', `always',\n\ @@ -267,17 +277,23 @@ Display options:\n\ --cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\ --font, -fn FONT default font; must be fixed-width\n\ --foreground-color, -fg COLOR window foreground color\n\ +", + "\ --fullheight, -fh make the first frame high as the screen\n\ --fullscreen, -fs make the first frame fullscreen\n\ --fullwidth, -fw make the first frame wide as the screen\n\ --maximized, -mm make the first frame maximized\n\ --geometry, -g GEOMETRY window geometry\n\ +", + "\ --no-bitmap-icon, -nbi do not use picture of gnu for Emacs icon\n\ --iconic start Emacs in iconified state\n\ --internal-border, -ib WIDTH width between text and main border\n\ --line-spacing, -lsp PIXELS additional space to put between lines\n\ --mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ --name NAME title for initial Emacs frame\n\ +", + "\ --no-blinking-cursor, -nbc disable blinking cursor\n\ --reverse-video, -r, -rv switch foreground and background\n\ --title, -T TITLE title for initial Emacs frame\n\ @@ -286,9 +302,9 @@ Display options:\n\ --parent-id XID set parent window\n\ --help display this help and exit\n\ --version output version information and exit\n\ -\n" - -#define USAGE4 "\ +\n\ +", + "\ You can generally also specify long option names with a single -; for\n\ example, -batch as well as --batch. You can use any unambiguous\n\ abbreviation for a --option.\n\ @@ -298,6 +314,7 @@ Emacs' operation. See the main documentation.\n\ \n\ Report bugs to bug-gnu-emacs@gnu.org. First, please see the Bugs\n\ section of the Emacs manual or the file BUGS.\n" + }; /* True if handling a fatal error already. */ @@ -934,9 +951,10 @@ main (int argc, char **argv) /* Handle the --help option, which gives a usage message. */ if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) { - printf (USAGE1, argv[0], USAGE2); - printf (USAGE3); - printf (USAGE4); + int i; + printf ("Usage: %s [OPTION-OR-FILENAME]...\n", argv[0]); + for (i = 0; i < sizeof usage_message / sizeof *usage_message; i++) + fputs (usage_message[i], stdout); exit (0); } |