annotate man/xemacs/cmdargs.texi @ 1292:f3437b56874d

[xemacs-hg @ 2003-02-13 09:57:04 by ben] profile updates profile.c: Major reworking. Keep track of new information -- total function timing (includes descendants), GC usage, total GC usage (includes descendants). New functions to be called appropriately from eval.c, alloc.c to keep track of this information. Keep track of when we're actually in a function vs. in its profile, for more accurate timing counts. Track profile overhead separately. Create new mechanism for specifying "internal sections" that are tracked just like regular Lisp functions and even appear in the backtrace if `backtrace-with-internal-sections' is non-nil (t by default for error-checking builds). Add some KKCC information for the straight (non-Elisp) hash table used by profile, which contains Lisp objects in its keys -- but not used yet. Remove old ad-hoc methods for tracking garbage collection, redisplay (which was incorrect anyway when Lisp was called within these sections). Don't record any tick info when blocking under MS Windows, since the timer there is in real time rather than in process time. Make `start-profiling', `stop-profiling' interactive. Be consistent wrt. recursive functions and functions currently on the stack when starting or stopping -- together these make implementing the `total' values extremely difficult. When we start profiling, we act as if we just entered all the functions currently on the stack. Likewise when exiting. Create vars in_profile for tracking time spent inside of profiling, and profiling_lock for setting exclusive access to the main hash table when reading from it or modifying it. (protects against getting screwed up by the signal handle going off at the same time. profile.h: New file. Create macros for declaring internal profiling sections. lisp.h: Move profile-related stuff to profile.h. alloc.c: Keep track of total consing, for profile. Tell profile when we are consing. Use new profile-section method for noting garbage-collection. alloc.c: Abort if we attempt to call the allocator reentrantly. backtrace.h, eval.c: Add info for use by profile in the backtrace frame and transfer PUSH_BACKTRACE/POP_BACKTRACE from eval.c, for use with profile. elhash.c: Author comment. eval.c, lisp.h: New Lisp var `backtrace-with-internal-sections'. Set to t when error-checking is on. eval.c: When unwinding, eval.c: Report to profile when we are about-to-call and just-called wrt. a function. alloc.c, eval.c: Allow for "fake" backtrace frames, for internal sections (used by profile and `backtrace-with-internal-sections'. event-Xt.c, event-gtk.c, event-msw.c, event-tty.c: Record when we are actually blocking on an event, for profile's sake. event-stream.c: Record internal profiling sections for getting, dispatching events. extents.c: Record internal profiling sections for map_extents. hash.c, hash.h: Add pregrow_hash_table_if_necessary(). (Used in profile code since the signal handler is the main grower but can't allow a realloc(). We make sure, at critical points, that the table is large enough.) lread.c: Create internal profiling sections for `load' (which may be triggered internally by autoload, etc.). redisplay.c: Remove old profile_redisplay_flag. Use new macros to declare internal profiling section for redisplay. text.c: Use new macros to declare internal profiling sections for char-byte conversion and internal-external conversion. SEMI-UNRELATED CHANGES: ----------------------- text.c: Update the long comments.
author ben
date Thu, 13 Feb 2003 09:57:08 +0000
parents 1ccc32a20af4
children fd8a9a4d81d9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 @node Command Switches, Startup Paths, Exiting, Top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 @section Command Line Switches and Arguments
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 @cindex command line arguments
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 @cindex arguments (from shell)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 XEmacs supports command line arguments you can use to request
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 various actions when invoking Emacs. The commands are for compatibility
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 with other editors and for sophisticated activities. If you are using
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 XEmacs under the X window system, you can also use a number of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 standard Xt command line arguments. Command line arguments are not usually
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 needed for editing with Emacs; new users can skip this section.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13
446
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
14 Many editors are designed to be started afresh each time you want to
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 edit. You start the editor to edit one file; then exit the editor. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 next time you want to edit either another file or the same one, you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 start the editor again. Under these circumstances, it makes sense to use a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 command line argument to say which file to edit.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 The recommended way to use XEmacs is to start it only once, just
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 after you log in, and do all your editing in the same Emacs process.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 Each time you want to edit a file, you visit it using the existing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 Emacs. Emacs creates a new buffer for each file, and (unless you kill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 some of the buffers) Emacs eventually has many files in it ready for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 editing. Usually you do not kill the Emacs process until you are about
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 to log out. Since you usually read files by typing commands to Emacs,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 command line arguments for specifying a file when Emacs is started are seldom
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 needed.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 Emacs accepts command-line arguments that specify files to visit,
446
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
31 functions to call, and other activities and operating modes. If you
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
32 are running XEmacs under the X window system, a number of standard Xt
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
33 command line arguments are available, as well as a few X parameters
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
34 that are XEmacs-specific.
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
35
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
36 Options with long names with a single initial hyphen are also
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
37 recognized with the GNU double initial hyphen syntax. (The reverse
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
38 is not true.)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 The following subsections list:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 @itemize @bullet
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 Command line arguments that you can always use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 Command line arguments that have to appear at the beginning of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 argument list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 @item
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 Command line arguments that are only relevant if you are running XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 under X
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 @end itemize
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 @subsection Command Line Arguments for Any Position
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 Command line arguments are processed in the order they appear on the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 command line; however, certain arguments (the ones in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 second table) must be at the front of the list if they are used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 Here are the arguments allowed:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 @table @samp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 @item @var{file}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 Visit @var{file} using @code{find-file}. @xref{Visiting}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 @item +@var{linenum} @var{file}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 Visit @var{file} using @code{find-file}, then go to line number
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 @var{linenum} in it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 @item -load @var{file}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 @itemx -l @var{file}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 Load a file @var{file} of Lisp code with the function @code{load}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 @xref{Lisp Libraries}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 @item -funcall @var{function}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 @itemx -f @var{function}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 Call Lisp function @var{function} with no arguments.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 @item -eval @var{function}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 Interpret the next argument as a Lisp expression, and evaluate it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 You must be very careful of the shell quoting here.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 @item -insert @var{file}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 @itemx -i @var{file}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 Insert the contents of @var{file} into the current buffer. This is like
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 what @kbd{M-x insert-buffer} does; @xref{Misc File Ops}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 @item -kill
446
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
86 Exit from Emacs without asking for confirmation. Always the last
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
87 argument processed, no matter where it appears in the command line.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 @item -version
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 @itemx -V
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 Prints version information. This implies @samp{-batch}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 % xemacs -version
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 XEmacs 19.13 of Mon Aug 21 1995 on willow (usg-unix-v) [formerly Lucid Emacs]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 @item -help
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 Prints a summary of command-line options and then exits.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 @subsection Command Line Arguments (Beginning of Line Only)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 The following arguments are recognized only at the beginning of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 command line. If more than one of them appears, they must appear in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 order in which they appear in this table.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 @table @samp
446
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
108 @item --show-dump-id
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
109 @itemx -sd
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
110 Print the ID for the new portable dumper's dump file on the terminal and
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
111 exit. (Prints an error message and exits if XEmacs was not configured
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
112 @samp{--pdump}.)
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
113
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
114 @item --no-dump-file
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
115 @itemx -nd
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
116 Don't load the dump file. Roughly equivalent to old temacs. (Ignored if
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
117 XEmacs was not configured @samp{--pdump}.)
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
118
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
119 @item --terminal @var{file}
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
120 @itemx -t @var{file}
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 Use @var{file} instead of the terminal for input and output. This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 implies the @samp{-nw} option, documented below.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 @cindex batch mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 @item -batch
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 Run Emacs in @dfn{batch mode}, which means that the text being edited is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 not displayed and the standard Unix interrupt characters such as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 @kbd{C-z} and @kbd{C-c} continue to have their normal effect. Emacs in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 batch mode outputs to @code{stderr} only what would normally be printed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 in the echo area under program control.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 Batch mode is used for running programs written in Emacs Lisp from shell
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 scripts, makefiles, and so on. Normally the @samp{-l} switch or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 @samp{-f} switch will be used as well, to invoke a Lisp program to do
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 the batch processing.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 @samp{-batch} implies @samp{-q} (do not load an init file). It also
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 causes Emacs to kill itself after all command switches have been
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 processed. In addition, auto-saving is not done except in buffers for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 which it has been explicitly requested.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141
446
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
142 @item --no-windows
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
143 @itemx -nw
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 Start up XEmacs in TTY mode (using the TTY XEmacs was started from),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 rather than trying to connect to an X display. Note that this happens
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 automatically if the @samp{DISPLAY} environment variable is not set.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 @item -debug-init
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 Enter the debugger if an error in the init file occurs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 @item -debug-paths
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 Displays information on how XEmacs constructs the various paths into its
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 hierarchy on startup. (See also @pxref{Startup Paths}.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 @item -unmapped
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 Do not map the initial frame. This is useful if you want to start up
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 XEmacs as a server (e.g. for gnuserv screens or external client widgets).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 @item -no-init-file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 @itemx -q
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
161 Do not load your Emacs init file. @xref{Init File}.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 @item -no-site-file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 Do not load the site-specific init file @file{lisp/site-start.el}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 @item -no-autoloads
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 Do not load global symbol files (@file{auto-autoloads}) at startup.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 This implies @samp{-vanilla}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 @item -no-early-packages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 Do not process early packages. (For more information on startup issues
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 concerning the package system, @xref{Startup Paths}.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 @item -vanilla
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 This is equivalent to @samp{-q -no-site-file -no-early-packages}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 @item -user-init-file @var{file}
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
178 Load @var{file} as your Emacs init file instead of
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
179 @file{~/.xemacs/init.el}/@file{~/.emacs}.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 @item -user-init-directory @var{directory}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 Use @var{directory} as the location of your early package hierarchies
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 and the various user-specific initialization files.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 @item -user @var{user}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 @itemx -u @var{user}
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
187 Equivalent to @samp{-user-init-file ~@var{user}/.xemacs/init.el
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
188 -user-init-directory ~@var{user}/.xemacs}, or @samp{-user-init-file
446
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
189 ~@var{user}/.emacs -user-init-directory ~@var{user}/.xemacs}, whichever
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
190 init file comes first. @xref{Init File}.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 @vindex command-line-args
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 Note that the init file can get access to the command line argument
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 values as the elements of a list in the variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 @code{command-line-args}. (The arguments in the second table above will
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 already have been processed and will not be in the list.) The init file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 can override the normal processing of the other arguments by setting
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 this variable.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 One way to use command switches is to visit many files automatically:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 xemacs *.c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 passes each @code{.c} file as a separate argument to Emacs, so that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 Emacs visits each file (@pxref{Visiting}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 Here is an advanced example that assumes you have a Lisp program file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 called @file{hack-c-program.el} which, when loaded, performs some useful
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 operation on the current buffer, expected to be a C program.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 xemacs -batch foo.c -l hack-c-program -f save-buffer -kill > log
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 Here Emacs is told to visit @file{foo.c}, load @file{hack-c-program.el}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 (which makes changes in the visited file), save @file{foo.c} (note that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 @code{save-buffer} is the function that @kbd{C-x C-s} is bound to), and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 then exit to the shell from which the command was executed. @samp{-batch}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 guarantees there will be no problem redirecting output to @file{log},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 because Emacs will not assume that it has a display terminal to work
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 with.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 @subsection Command Line Arguments (for XEmacs Under X)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 @vindex frame-title-format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 @vindex frame-icon-title-format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 If you are running XEmacs under X, a number of options are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 available to control color, border, and window title and icon name:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 @table @samp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 @item -title @var{title}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 @itemx -wn @var{title}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 @itemx -T @var{title}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 Use @var{title} as the window title. This sets the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 @code{frame-title-format} variable, which controls the title of the X
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 window corresponding to the selected frame. This is the same format as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 @code{mode-line-format}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 @item -iconname @var{title}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 @itemx -in @var{title}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 Use @var{title} as the icon name. This sets the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 @code{frame-icon-title-format} variable, which controls the title of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 the icon corresponding to the selected frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 @item -mc @var{color}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 Use @var{color} as the mouse color.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 @item -cr @var{color}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 Use @var{color} as the text-cursor foreground color.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 @item -private
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 Install a private colormap for XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 In addition, XEmacs allows you to use a number of standard Xt
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 command line arguments.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 @table @samp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 @item -background @var{color}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 @itemx -bg @var{color}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 Use @var{color} as the background color.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 @item -bordercolor @var{color}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 @itemx -bd @var{color}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 Use @var{color} as the border color.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 @item -borderwidth @var{width}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 @itemx -bw @var{width}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 Use @var{width} as the border width.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 @item -display @var{display}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 @itemx -d @var{display}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 When running under the X window system, create the window containing the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 Emacs frame on the display named @var{display}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 @item -foreground @var{color}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 @itemx -fg @var{color}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 Use @var{color} as the foreground color.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 @item -font @var{name}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 @itemx -fn @var{name}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 Use @var{name} as the default font.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 @item -geometry @var{spec}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 @itemx -geom @var{spec}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 @itemx -g @var{spec}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 Use the geometry (window size and/or position) specified by @var{spec}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 @item -iconic
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 Start up iconified.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 @item -rv
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 Bring up Emacs in reverse video.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 @item -name @var{name}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 Use the resource manager resources specified by @var{name}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 The default is to use the name of the program (@code{argv[0]}) as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 the resource manager name.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 @item -xrm
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 Read something into the resource database for this invocation of Emacs only.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 @end table