diff options
| -rw-r--r-- | src/emacs.c | 81 |
1 files changed, 71 insertions, 10 deletions
diff --git a/src/emacs.c b/src/emacs.c index 162fa8d07ca..61572e5f61f 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -200,6 +200,76 @@ int initial_argc; | |||
| 200 | 200 | ||
| 201 | static void sort_args (); | 201 | static void sort_args (); |
| 202 | void syms_of_emacs (); | 202 | void syms_of_emacs (); |
| 203 | |||
| 204 | #define USAGE "\ | ||
| 205 | Usage: %s [OPTION-OR-FILENAME]...\n\ | ||
| 206 | \n\ | ||
| 207 | Run Emacs, the extensible, customizable, self-documenting real-time\n\ | ||
| 208 | display editor. The recommended way to start Emacs for normal editing\n\ | ||
| 209 | is with no options at all.\n\ | ||
| 210 | \n\ | ||
| 211 | Run M-x info RET m emacs RET m command arguments RET inside Emacs to\n\ | ||
| 212 | read the main documentation for these command-line arguments.\n\ | ||
| 213 | \n\ | ||
| 214 | Initialization options:\n\ | ||
| 215 | \n\ | ||
| 216 | --batch do not do interactive display; implies -q\n\ | ||
| 217 | --debug-init enable Emacs Lisp debugger during init file\n\ | ||
| 218 | --help display this help message and exit\n\ | ||
| 219 | --multibyte, --no-unibyte run Emacs in multibyte mode\n\ | ||
| 220 | --no-init-file, -q load neither ~/.emacs nor default.el\n\ | ||
| 221 | --no-shared-memory, -nl do not use shared memory\n\ | ||
| 222 | --no-site-file do not load site-start.el\n\ | ||
| 223 | --no-windows, -nw don't communicate with X, ignoring $DISPLAY\n\ | ||
| 224 | --terminal, -t DEVICE use DEVICE for terminal I/O\n\ | ||
| 225 | --unibyte, --no-multibyte run Emacs in unibyte mode\n\ | ||
| 226 | --user, -u USER load ~USER/.emacs instead of your own\n\ | ||
| 227 | --version display version information and exit\n\ | ||
| 228 | \n\ | ||
| 229 | Action options:\n\ | ||
| 230 | \n\ | ||
| 231 | FILE visit FILE using find-file\n\ | ||
| 232 | +LINENUM FILE visit FILE using find-file, then go to line LINENUM\n\ | ||
| 233 | --directory, -L DIR add DIR to variable load-path\n\ | ||
| 234 | --eval EXPR evaluate Emacs Lisp expression EXPR\n\ | ||
| 235 | --execute EXPR evaluate Emacs Lisp expression EXPR\n\ | ||
| 236 | --find-file FILE visit FILE\n\ | ||
| 237 | --funcall, -f FUNC call Emacs function FUNC with no arguments\n\ | ||
| 238 | --insert FILE insert contents of FILE into current buffer\n\ | ||
| 239 | --kill exit without asking for confirmation\n\ | ||
| 240 | --load, -l FILE load FILE of Emacs Lisp code using the load function\n\ | ||
| 241 | --visit FILE visit FILE\n\ | ||
| 242 | \n\ | ||
| 243 | X window system options:\n\ | ||
| 244 | \n\ | ||
| 245 | --background-color, -bg COLOR window background color\n\ | ||
| 246 | --border-color, -bd COLOR main border color\n\ | ||
| 247 | --border-width, -bw WIDTH width of main border\n\ | ||
| 248 | --cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\ | ||
| 249 | --display, -d DISPLAY use X server DISPLAY\n\ | ||
| 250 | --font, -fn FONT default font; must be fixed-widthp\n\ | ||
| 251 | --foreground-color, -fg COLOR window foreground color\n\ | ||
| 252 | --geometry, -g GEOMETRY window geometry\n\ | ||
| 253 | --iconic start Emacs in iconified state\n\ | ||
| 254 | --icon-type, -i use picture of gnu for Emacs icon\n\ | ||
| 255 | --internal-border, -ib WIDTH width between text and main border\n\ | ||
| 256 | --mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ | ||
| 257 | --name NAME title of main Emacs window\n\ | ||
| 258 | --reverse-video, -r, -rv switch foreground and background\n\ | ||
| 259 | --title, -T, -wn, TITLE title for Emacs windows\n\ | ||
| 260 | --vertical-scroll-bars, -vb enable vertical scroll bars\n\ | ||
| 261 | --xrm XRESOURCES set additional X resources\n\ | ||
| 262 | \n\ | ||
| 263 | You can generally also specify long option names with a single -; for\n\ | ||
| 264 | example, -batch as well as --batch. You can use any unambiguous\n\ | ||
| 265 | abbreviation for a --option.\n\ | ||
| 266 | \n\ | ||
| 267 | Various environment variables and window system resources also affect\n\ | ||
| 268 | Emacs' operation. See the main documentation.\n\ | ||
| 269 | \n\ | ||
| 270 | Report bugs to bug-gnu-emacs@gnu.org. First, please see the Bugs\n\ | ||
| 271 | section of the Emacs manual or the file BUGS.\n" | ||
| 272 | |||
| 203 | 273 | ||
| 204 | /* Signal code for the fatal signal that was received */ | 274 | /* Signal code for the fatal signal that was received */ |
| 205 | int fatal_error_code; | 275 | int fatal_error_code; |
| @@ -869,16 +939,7 @@ main (argc, argv, envp) | |||
| 869 | /* Handle the --help option, which gives a usage message.. */ | 939 | /* Handle the --help option, which gives a usage message.. */ |
| 870 | if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) | 940 | if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) |
| 871 | { | 941 | { |
| 872 | printf ("\ | 942 | printf (USAGE, argv[0]); |
| 873 | Usage: %s [--batch] [-t term] [--terminal term]\n\ | ||
| 874 | [-d display] [--display display] [-nw] [--no-windows]\n\ | ||
| 875 | [-q] [--no-init-file] [-u user] [--user user] [--debug-init]\n\ | ||
| 876 | [--unibyte] [--multibyte] [--version] [--no-site-file]\n\ | ||
| 877 | [-f func] [--funcall func] [-l file] [--load file] [--eval expr]\n\ | ||
| 878 | [--execute expr] [--visit file] [--file file] [--insert file]\n\ | ||
| 879 | [+linenum] file-to-visit [--kill]\n\ | ||
| 880 | Report bugs to bug-gnu-emacs@gnu.org. First, please see\n\ | ||
| 881 | the Bugs section of the Emacs manual or the file BUGS.\n", argv[0]); | ||
| 882 | exit (0); | 943 | exit (0); |
| 883 | } | 944 | } |
| 884 | 945 | ||