Sync up with r21-2-27.
[chise/xemacs-chise.git-] / info / xemacs.info-17
1 This is Info file ../info/xemacs.info, produced by Makeinfo version
2 1.68 from the input file xemacs/xemacs.texi.
3
4 INFO-DIR-SECTION XEmacs Editor
5 START-INFO-DIR-ENTRY
6 * XEmacs: (xemacs).             XEmacs Editor.
7 END-INFO-DIR-ENTRY
8
9    This file documents the XEmacs editor.
10
11    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
12 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
13 Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
14
15    Permission is granted to make and distribute verbatim copies of this
16 manual provided the copyright notice and this permission notice are
17 preserved on all copies.
18
19    Permission is granted to copy and distribute modified versions of
20 this manual under the conditions for verbatim copying, provided also
21 that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
22 General Public License" are included exactly as in the original, and
23 provided that the entire resulting derived work is distributed under the
24 terms of a permission notice identical to this one.
25
26    Permission is granted to copy and distribute translations of this
27 manual into another language, under the above conditions for modified
28 versions, except that the sections entitled "The GNU Manifesto",
29 "Distribution" and "GNU General Public License" may be included in a
30 translation approved by the author instead of in the original English.
31
32 \1f
33 File: xemacs.info,  Node: Disabling,  Prev: Rebinding,  Up: Key Bindings
34
35 Disabling Commands
36 ------------------
37
38    Disabling a command marks it as requiring confirmation before it can
39 be executed.  The purpose of disabling a command is to prevent
40 beginning users from executing it by accident and being confused.
41
42    The direct mechanism for disabling a command is to have a non-`nil'
43 `disabled' property on the Lisp symbol for the command.  These
44 properties are normally set by the user's `.emacs' file with Lisp
45 expressions such as:
46
47      (put 'delete-region 'disabled t)
48
49    If the value of the `disabled' property is a string, that string is
50 included in the message printed when the command is used:
51
52      (put 'delete-region 'disabled
53           "Text deleted this way cannot be yanked back!\n")
54
55    You can disable a command either by editing the `.emacs' file
56 directly or with the command `M-x disable-command', which edits the
57 `.emacs' file for you.  *Note Init File::.
58
59    When you attempt to invoke a disabled command interactively in Emacs,
60 a window is displayed containing the command's name, its documentation,
61 and some instructions on what to do next; then Emacs asks for input
62 saying whether to execute the command as requested, enable it and
63 execute, or cancel it.  If you decide to enable the command, you are
64 asked whether to do this permanently or just for the current session.
65 Enabling permanently works by automatically editing your `.emacs' file.
66 You can use `M-x enable-command' at any time to enable any command
67 permanently.
68
69    Whether a command is disabled is independent of what key is used to
70 invoke it; it also applies if the command is invoked using `M-x'.
71 Disabling a command has no effect on calling it as a function from Lisp
72 programs.
73
74 \1f
75 File: xemacs.info,  Node: Syntax,  Next: Init File,  Prev: Key Bindings,  Up: Customization
76
77 The Syntax Table
78 ================
79
80    All the Emacs commands which parse words or balance parentheses are
81 controlled by the "syntax table".  The syntax table specifies which
82 characters are opening delimiters, which are parts of words, which are
83 string quotes, and so on.  Actually, each major mode has its own syntax
84 table (though sometimes related major modes use the same one) which it
85 installs in each buffer that uses that major mode.  The syntax table
86 installed in the current buffer is the one that all commands use, so we
87 call it "the" syntax table.  A syntax table is a Lisp object, a vector
88 of length 256 whose elements are numbers.
89
90 * Menu:
91
92 * Entry: Syntax Entry.    What the syntax table records for each character.
93 * Change: Syntax Change.  How to change the information.
94
95 \1f
96 File: xemacs.info,  Node: Syntax Entry,  Next: Syntax Change,  Up: Syntax
97
98 Information About Each Character
99 --------------------------------
100
101    The syntax table entry for a character is a number that encodes six
102 pieces of information:
103
104    * The syntactic class of the character, represented as a small
105      integer
106
107    * The matching delimiter, for delimiter characters only (the
108      matching delimiter of `(' is `)', and vice versa)
109
110    * A flag saying whether the character is the first character of a
111      two-character comment starting sequence
112
113    * A flag saying whether the character is the second character of a
114      two-character comment starting sequence
115
116    * A flag saying whether the character is the first character of a
117      two-character comment ending sequence
118
119    * A flag saying whether the character is the second character of a
120      two-character comment ending sequence
121
122    The syntactic classes are stored internally as small integers, but
123 are usually described to or by the user with characters.  For example,
124 `(' is used to specify the syntactic class of opening delimiters.  Here
125 is a table of syntactic classes, with the characters that specify them.
126
127 ` '
128      The class of whitespace characters.
129
130 `w'
131      The class of word-constituent characters.
132
133 `_'
134      The class of characters that are part of symbol names but not
135      words.  This class is represented by `_' because the character `_'
136      has this class in both C and Lisp.
137
138 `.'
139      The class of punctuation characters that do not fit into any other
140      special class.
141
142 `('
143      The class of opening delimiters.
144
145 `)'
146      The class of closing delimiters.
147
148 `''
149      The class of expression-adhering characters.  These characters are
150      part of a symbol if found within or adjacent to one, and are part
151      of a following expression if immediately preceding one, but are
152      like whitespace if surrounded by whitespace.
153
154 `"'
155      The class of string-quote characters.  They match each other in
156      pairs, and the characters within the pair all lose their syntactic
157      significance except for the `\' and `/' classes of escape
158      characters, which can be used to include a string-quote inside the
159      string.
160
161 `$'
162      The class of self-matching delimiters.  This is intended for TeX's
163      `$', which is used both to enter and leave math mode.  Thus, a
164      pair of matching `$' characters surround each piece of math mode
165      TeX input.  A pair of adjacent `$' characters act like a single
166      one for purposes of matching.
167
168 `/'
169      The class of escape characters that always just deny the following
170      character its special syntactic significance.  The character after
171      one of these escapes is always treated as alphabetic.
172
173 `\'
174      The class of C-style escape characters.  In practice, these are
175      treated just like `/'-class characters, because the extra
176      possibilities for C escapes (such as being followed by digits)
177      have no effect on where the containing expression ends.
178
179 `<'
180      The class of comment-starting characters.  Only single-character
181      comment starters (such as `;' in Lisp mode) are represented this
182      way.
183
184 `>'
185      The class of comment-ending characters.  Newline has this syntax in
186      Lisp mode.
187
188    The characters flagged as part of two-character comment delimiters
189 can have other syntactic functions most of the time.  For example, `/'
190 and `*' in C code, when found separately, have nothing to do with
191 comments.  The comment-delimiter significance overrides when the pair of
192 characters occur together in the proper order.  Only the list and sexp
193 commands use the syntax table to find comments; the commands
194 specifically for comments have other variables that tell them where to
195 find comments.  Moreover, the list and sexp commands notice comments
196 only if `parse-sexp-ignore-comments' is non-`nil'.  This variable is set
197 to `nil' in modes where comment-terminator sequences are liable to
198 appear where there is no comment, for example, in Lisp mode where the
199 comment terminator is a newline but not every newline ends a comment.
200
201 \1f
202 File: xemacs.info,  Node: Syntax Change,  Prev: Syntax Entry,  Up: Syntax
203
204 Altering Syntax Information
205 ---------------------------
206
207    It is possible to alter a character's syntax table entry by storing
208 a new number in the appropriate element of the syntax table, but it
209 would be hard to determine what number to use.  Emacs therefore
210 provides a command that allows you to specify the syntactic properties
211 of a character in a convenient way.
212
213    `M-x modify-syntax-entry' is the command to change a character's
214 syntax.  It can be used interactively and is also used by major modes
215 to initialize their own syntax tables.  Its first argument is the
216 character to change.  The second argument is a string that specifies the
217 new syntax.  When called from Lisp code, there is a third, optional
218 argument, which specifies the syntax table in which to make the change.
219 If not supplied, or if this command is called interactively, the third
220 argument defaults to the current buffer's syntax table.
221
222   1. The first character in the string specifies the syntactic class.
223      It is one of the characters in the previous table (*note Syntax
224      Entry::.).
225
226   2. The second character is the matching delimiter.  For a character
227      that is not an opening or closing delimiter, this should be a
228      space, and may be omitted if no following characters are needed.
229
230   3. The remaining characters are flags.  The flag characters allowed
231      are:
232
233     `1'
234           Flag this character as the first of a two-character comment
235           starting sequence.
236
237     `2'
238           Flag this character as the second of a two-character comment
239           starting sequence.
240
241     `3'
242           Flag this character as the first of a two-character comment
243           ending sequence.
244
245     `4'
246           Flag this character as the second of a two-character comment
247           ending sequence.
248
249    Use `C-h s' (`describe-syntax') to display a description of the
250 contents of the current syntax table.  The description of each
251 character includes both the string you have to pass to
252 `modify-syntax-entry' to set up that character's current syntax, and
253 some English to explain that string if necessary.
254
255 \1f
256 File: xemacs.info,  Node: Init File,  Next: Audible Bell,  Prev: Syntax,  Up: Customization
257
258 The Init File, .emacs
259 =====================
260
261    When you start Emacs, it normally loads the file `.emacs' in your
262 home directory.  This file, if it exists, should contain Lisp code.  It
263 is called your initialization file or "init file".  Use the command
264 line switch `-q' to tell Emacs whether to load an init file (*note
265 Entering Emacs::.).  Use the command line switch `-user-init-file'
266 (*note Command Switches::.) to tell Emacs to load a different file
267 instead of `~/.emacs'.
268
269    When the `.emacs' file is read, the variable `user-init-file' says
270 which init file was loaded.
271
272    At some sites there is a "default init file", which is the library
273 named `default.el', found via the standard search path for libraries.
274 The Emacs distribution contains no such library; your site may create
275 one for local customizations.  If this library exists, it is loaded
276 whenever you start Emacs.  But your init file, if any, is loaded first;
277 if it sets `inhibit-default-init' non-`nil', then `default' is not
278 loaded.
279
280    If you have a large amount of code in your `.emacs' file, you should
281 move it into another file named `SOMETHING.el', byte-compile it (*note
282 Lisp Libraries::.), and load that file from your `.emacs' file using
283 `load'.
284
285 * Menu:
286
287 * Init Syntax::     Syntax of constants in Emacs Lisp.
288 * Init Examples::   How to do some things with an init file.
289 * Terminal Init::   Each terminal type can have an init file.
290
291 \1f
292 File: xemacs.info,  Node: Init Syntax,  Next: Init Examples,  Up: Init File
293
294 Init File Syntax
295 ----------------
296
297    The `.emacs' file contains one or more Lisp function call
298 expressions.  Each consists of a function name followed by arguments,
299 all surrounded by parentheses.  For example, `(setq fill-column 60)'
300 represents a call to the function `setq' which is used to set the
301 variable `fill-column' (*note Filling::.) to 60.
302
303    The second argument to `setq' is an expression for the new value of
304 the variable.  This can be a constant, a variable, or a function call
305 expression.  In `.emacs', constants are used most of the time.  They
306 can be:
307
308 Numbers
309      Integers are written in decimal, with an optional initial minus
310      sign.
311
312      If a sequence of digits is followed by a period and another
313      sequence of digits, it is interpreted as a floating point number.
314
315      The number prefixes `#b', `#o', and `#x' are supported to
316      represent numbers in binary, octal, and hexadecimal notation (or
317      radix).
318
319 Strings
320      Lisp string syntax is the same as C string syntax with a few extra
321      features.  Use a double-quote character to begin and end a string
322      constant.
323
324      Newlines and special characters may be present literally in
325      strings.  They can also be represented as backslash sequences:
326      `\n' for newline, `\b' for backspace, `\r' for return, `\t' for
327      tab, `\f' for formfeed (control-l), `\e' for escape, `\\' for a
328      backslash, `\"' for a double-quote, or `\OOO' for the character
329      whose octal code is OOO.  Backslash and double-quote are the only
330      characters for which backslash sequences are mandatory.
331
332      You can use `\C-' as a prefix for a control character, as in
333      `\C-s' for ASCII Control-S, and `\M-' as a prefix for a Meta
334      character, as in `\M-a' for Meta-A or `\M-\C-a' for Control-Meta-A.
335
336 Characters
337      Lisp character constant syntax consists of a `?' followed by
338      either a character or an escape sequence starting with `\'.
339      Examples: `?x', `?\n', `?\"', `?\)'.  Note that strings and
340      characters are not interchangeable in Lisp; some contexts require
341      one and some contexts require the other.
342
343 True
344      `t' stands for `true'.
345
346 False
347      `nil' stands for `false'.
348
349 Other Lisp objects
350      Write a single-quote (') followed by the Lisp object you want.
351
352 \1f
353 File: xemacs.info,  Node: Init Examples,  Next: Terminal Init,  Prev: Init Syntax,  Up: Init File
354
355 Init File Examples
356 ------------------
357
358    Here are some examples of doing certain commonly desired things with
359 Lisp expressions:
360
361    * Make <TAB> in C mode just insert a tab if point is in the middle
362      of a line.
363
364           (setq c-tab-always-indent nil)
365
366      Here we have a variable whose value is normally `t' for `true' and
367      the alternative is `nil' for `false'.
368
369    * Make searches case sensitive by default (in all buffers that do not
370      override this).
371
372           (setq-default case-fold-search nil)
373
374      This sets the default value, which is effective in all buffers
375      that do not have local values for the variable.  Setting
376      `case-fold-search' with `setq' affects only the current buffer's
377      local value, which is probably not what you want to do in an init
378      file.
379
380    * Make Text mode the default mode for new buffers.
381
382           (setq default-major-mode 'text-mode)
383
384      Note that `text-mode' is used because it is the command for
385      entering the mode we want.  A single-quote is written before it to
386      make a symbol constant; otherwise, `text-mode' would be treated as
387      a variable name.
388
389    * Turn on Auto Fill mode automatically in Text mode and related
390      modes.
391
392           (setq text-mode-hook
393             '(lambda () (auto-fill-mode 1)))
394
395      Here we have a variable whose value should be a Lisp function.  The
396      function we supply is a list starting with `lambda', and a single
397      quote is written in front of it to make it (for the purpose of this
398      `setq') a list constant rather than an expression.  Lisp functions
399      are not explained here; for mode hooks it is enough to know that
400      `(auto-fill-mode 1)' is an expression that will be executed when
401      Text mode is entered.  You could replace it with any other
402      expression that you like, or with several expressions in a row.
403
404           (setq text-mode-hook 'turn-on-auto-fill)
405
406      This is another way to accomplish the same result.
407      `turn-on-auto-fill' is a symbol whose function definition is
408      `(lambda () (auto-fill-mode 1))'.
409
410    * Load the installed Lisp library named `foo' (actually a file
411      `foo.elc' or `foo.el' in a standard Emacs directory).
412
413           (load "foo")
414
415      When the argument to `load' is a relative pathname, not starting
416      with `/' or `~', `load' searches the directories in `load-path'
417      (*note Loading::.).
418
419    * Load the compiled Lisp file `foo.elc' from your home directory.
420
421           (load "~/foo.elc")
422
423      Here an absolute file name is used, so no searching is done.
424
425    * Rebind the key `C-x l' to run the function `make-symbolic-link'.
426
427           (global-set-key "\C-xl" 'make-symbolic-link)
428
429      or
430
431           (define-key global-map "\C-xl" 'make-symbolic-link)
432
433      Note once again the single-quote used to refer to the symbol
434      `make-symbolic-link' instead of its value as a variable.
435
436    * Do the same thing for C mode only.
437
438           (define-key c-mode-map "\C-xl" 'make-symbolic-link)
439
440    * Bind the function key <F1> to a command in C mode.  Note that the
441      names of function keys must be lower case.
442
443           (define-key c-mode-map 'f1 'make-symbolic-link)
444
445    * Bind the shifted version of <F1> to a command.
446
447           (define-key c-mode-map '(shift f1) 'make-symbolic-link)
448
449    * Redefine all keys which now run `next-line' in Fundamental mode to
450      run `forward-line' instead.
451
452           (substitute-key-definition 'next-line 'forward-line
453                                      global-map)
454
455    * Make `C-x C-v' undefined.
456
457           (global-unset-key "\C-x\C-v")
458
459      One reason to undefine a key is so that you can make it a prefix.
460      Simply defining `C-x C-v ANYTHING' would make `C-x C-v' a prefix,
461      but `C-x C-v' must be freed of any non-prefix definition first.
462
463    * Make `$' have the syntax of punctuation in Text mode.  Note the
464      use of a character constant for `$'.
465
466           (modify-syntax-entry ?\$ "." text-mode-syntax-table)
467
468    * Enable the use of the command `eval-expression' without
469      confirmation.
470
471           (put 'eval-expression 'disabled nil)
472
473 \1f
474 File: xemacs.info,  Node: Terminal Init,  Prev: Init Examples,  Up: Init File
475
476 Terminal-Specific Initialization
477 --------------------------------
478
479    Each terminal type can have a Lisp library to be loaded into Emacs
480 when it is run on that type of terminal.  For a terminal type named
481 TERMTYPE, the library is called `term/TERMTYPE' and it is found by
482 searching the directories `load-path' as usual and trying the suffixes
483 `.elc' and `.el'.  Normally it appears in the subdirectory `term' of
484 the directory where most Emacs libraries are kept.
485
486    The usual purpose of the terminal-specific library is to define the
487 escape sequences used by the terminal's function keys using the library
488 `keypad.el'.  See the file `term/vt100.el' for an example of how this
489 is done.
490
491    When the terminal type contains a hyphen, only the part of the name
492 before the first hyphen is significant in choosing the library name.
493 Thus, terminal types `aaa-48' and `aaa-30-rv' both use the library
494 `term/aaa'.  The code in the library can use `(getenv "TERM")' to find
495 the full terminal type name.
496
497    The library's name is constructed by concatenating the value of the
498 variable `term-file-prefix' and the terminal type.  Your `.emacs' file
499 can prevent the loading of the terminal-specific library by setting
500 `term-file-prefix' to `nil'.
501
502    The value of the variable `term-setup-hook', if not `nil', is called
503 as a function of no arguments at the end of Emacs initialization, after
504 both your `.emacs' file and any terminal-specific library have been
505 read.  You can set the value in the `.emacs' file to override part of
506 any of the terminal-specific libraries and to define initializations
507 for terminals that do not have a library.
508
509 \1f
510 File: xemacs.info,  Node: Audible Bell,  Next: Faces,  Prev: Init File,  Up: Customization
511
512 Changing the Bell Sound
513 =======================
514
515    You can now change how the audible bell sounds using the variable
516 `sound-alist'.
517
518    `sound-alist''s value is an list associating symbols with, among
519 other things, strings of audio-data.  When `ding' is called with one of
520 the symbols, the associated sound data is played instead of the
521 standard beep.  This only works if you are logged in on the console of a
522 machine with audio hardware. To listen to a sound of the provided type,
523 call the function `play-sound' with the argument SOUND. You can also
524 set the volume of the sound with the optional argument VOLUME.
525
526    Each element of `sound-alist' is a list describing a sound.  The
527 first element of the list is the name of the sound being defined.
528 Subsequent elements of the list are alternating keyword/value pairs:
529
530 `sound'
531      A string of raw sound data, or the name of another sound to play.
532      The symbol `t' here means use the default X beep.
533
534 `volume'
535      An integer from 0-100, defaulting to `bell-volume'.
536
537 `pitch'
538      If using the default X beep, the pitch (Hz) to generate.
539
540 `duration'
541      If using the default X beep, the duration (milliseconds).
542
543    For compatibility, elements of `sound-alist' may also be of the form:
544
545      ( SOUND-NAME . <SOUND> )
546      ( SOUND-NAME <VOLUME> <SOUND> )
547
548    You should probably add things to this list by calling the function
549 `load-sound-file'.
550
551    Note that you can only play audio data if running on the console
552 screen of a machine with audio hardware which emacs understands, which
553 at this time means a Sun SparcStation, SGI, or HP9000s700.
554
555    Also note that the pitch, duration, and volume options are available
556 everywhere, but most X servers ignore the `pitch' option.
557
558    The variable `bell-volume' should be an integer from 0 to 100, with
559 100 being loudest, which controls how loud the sounds emacs makes
560 should be.  Elements of the `sound-alist' may override this value.
561 This variable applies to the standard X bell sound as well as sound
562 files.
563
564    If the symbol `t' is in place of a sound-string, Emacs uses the
565 default X beep.  This allows you to define beep-types of different
566 volumes even when not running on the console.
567
568    You can add things to this list by calling the function
569 `load-sound-file', which reads in an audio-file and adds its data to
570 the sound-alist. You can specify the sound with the SOUND-NAME argument
571 and the file into which the sounds are loaded with the FILENAME
572 argument. The optional VOLUME argument sets the volume.
573
574    `load-sound-file (FILENAME SOUND-NAME &optional VOLUME)'
575
576    To load and install some sound files as beep-types, use the function
577 `load-default-sounds' (note that this only works if you are on display
578 0 of a machine with audio hardware).
579
580    The following beep-types are used by Emacs itself. Other Lisp
581 packages may use other beep types, but these are the ones that the C
582 kernel of Emacs uses.
583
584 `auto-save-error'
585      An auto-save does not succeed
586
587 `command-error'
588      The Emacs command loop catches an error
589
590 `undefined-key'
591      You type a key that is undefined
592
593 `undefined-click'
594      You use an undefined mouse-click combination
595
596 `no-completion'
597      Completion was not possible
598
599 `y-or-n-p'
600      You type something other than the required `y' or `n'
601
602 `yes-or-no-p'
603      You type something other than `yes' or `no'
604
605 \1f
606 File: xemacs.info,  Node: Faces,  Next: X Resources,  Prev: Audible Bell,  Up: Customization
607
608 Faces
609 =====
610
611    XEmacs has objects called extents and faces.  An "extent" is a
612 region of text and a "face" is a collection of textual attributes, such
613 as fonts and colors.  Every extent is displayed in some face;
614 therefore, changing the properties of a face immediately updates the
615 display of all associated extents.  Faces can be frame-local: you can
616 have a region of text that displays with completely different
617 attributes when its buffer is viewed from a different X window.
618
619    The display attributes of faces may be specified either in Lisp or
620 through the X resource manager.
621
622 Customizing Faces
623 -----------------
624
625    You can change the face of an extent with the functions in this
626 section.  All the functions prompt for a FACE as an argument; use
627 completion for a list of possible values.
628
629 `M-x invert-face'
630      Swap the foreground and background colors of the given FACE.
631
632 `M-x make-face-bold'
633      Make the font of the given FACE bold.  When called from a program,
634      returns `nil' if this is not possible.
635
636 `M-x make-face-bold-italic'
637      Make the font of the given FACE bold italic.  When called from a
638      program, returns `nil' if not possible.
639
640 `M-x make-face-italic'
641      Make the font of the given FACE italic.  When called from a
642      program, returns `nil' if not possible.
643
644 `M-x make-face-unbold'
645      Make the font of the given FACE non-bold.  When called from a
646      program, returns `nil' if not possible.
647
648 `M-x make-face-unitalic'
649      Make the font of the given FACE non-italic.  When called from a
650      program, returns `nil' if not possible.
651
652 `M-x make-face-larger'
653      Make the font of the given FACE a little larger.  When called from
654      a program, returns `nil' if not possible.
655
656 `M-x make-face-smaller'
657      Make the font of the given FACE a little smaller.  When called
658      from a program, returns `nil' if not possible.
659
660 `M-x set-face-background'
661      Change the background color of the given FACE.
662
663 `M-x set-face-background-pixmap'
664      Change the background pixmap of the given FACE.
665
666 `M-x set-face-font'
667      Change the font of the given FACE.
668
669 `M-x set-face-foreground'
670      Change the foreground color of the given FACE.
671
672 `M-x set-face-underline-p'
673      Change whether the given FACE is underlined.
674
675    You can exchange the foreground and background color of the selected
676 FACE with the function `invert-face'. If the face does not specify both
677 foreground and background, then its foreground and background are set
678 to the background and foreground of the default face.  When calling
679 this from a program, you can supply the optional argument FRAME to
680 specify which frame is affected; otherwise, all frames are affected.
681
682    You can set the background color of the specified FACE with the
683 function `set-face-background'.  The argument `color' should be a
684 string, the name of a color.  When called from a program, if the
685 optional FRAME argument is provided, the face is changed only in that
686 frame; otherwise, it is changed in all frames.
687
688    You can set the background pixmap of the specified FACE with the
689 function `set-face-background-pixmap'.  The pixmap argument NAME should
690 be a string, the name of a file of pixmap data.  The directories listed
691 in the `x-bitmap-file-path' variable are searched.  The bitmap may also
692 be a list of the form `(WIDTH HEIGHT DATA)', where WIDTH and HEIGHT are
693 the size in pixels, and DATA is a string containing the raw bits of the
694 bitmap.  If the optional FRAME argument is provided, the face is
695 changed only in that frame; otherwise, it is changed in all frames.
696
697    The variable `x-bitmap-file-path' takes as a value a list of the
698 directories in which X bitmap files may be found.  If the value is
699 `nil', the list is initialized from the `*bitmapFilePath' resource.
700
701    If the environment variable XBMLANGPATH is set, then it is consulted
702 before the `x-bitmap-file-path' variable.
703
704    You can set the font of the specified FACE with the function
705 `set-face-font'.  The FONT argument should be a string, the name of a
706 font.  When called from a program, if the optional FRAME argument is
707 provided, the face is changed only in that frame; otherwise, it is
708 changed in all frames.
709
710    You can set the foreground color of the specified FACE with the
711 function `set-face-foreground'.  The argument COLOR should be a string,
712 the name of a color.  If the optional FRAME argument is provided, the
713 face is changed only in that frame; otherwise, it is changed in all
714 frames.
715
716    You can set underline the specified FACE with the function
717 `set-face-underline-p'. The argument UNDERLINE-P can be used to make
718 underlining an attribute of the face or not. If the optional FRAME
719 argument is provided, the face is changed only in that frame;
720 otherwise, it is changed in all frames.
721
722 \1f
723 File: xemacs.info,  Node: X Resources,  Prev: Faces,  Up: Customization
724
725 X Resources
726 ===========
727
728    Historically, XEmacs has used the X resource application class
729 `Emacs' for its resources.  Unfortunately, GNU Emacs uses the same
730 application class, and resources are not compatible between the two
731 Emacsen.  This sharing of the application class often leads to trouble
732 if you want to run both variants.
733
734    Starting with XEmacs 21, XEmacs uses the class `XEmacs' if it finds
735 any XEmacs resources in the resource database when the X connection is
736 initialized.  Otherwise, it will use the class `Emacs' for backwards
737 compatability.  The variable X-EMACS-APPLICATION-CLASS may be consulted
738 to determine the application class being used.
739
740    The examples in this section assume the application class is `Emacs'.
741
742    The Emacs resources are generally set per-frame. Each Emacs frame
743 can have its own name or the same name as another, depending on the
744 name passed to the `make-frame' function.
745
746    You can specify resources for all frames with the syntax:
747
748      Emacs*parameter: value
749
750 or
751
752      Emacs*EmacsFrame.parameter:value
753
754 You can specify resources for a particular frame with the syntax:
755
756      Emacs*FRAME-NAME.parameter: value
757
758 * Menu:
759
760 * Geometry Resources::     Controlling the size and position of frames.
761 * Iconic Resources::       Controlling whether frames come up iconic.
762 * Resource List::          List of resources settable on a frame or device.
763 * Face Resources::         Controlling faces using resources.
764 * Widgets::                The widget hierarchy for XEmacs.
765 * Menubar Resources::      Specifying resources for the menubar.
766
767 \1f
768 File: xemacs.info,  Node: Geometry Resources,  Next: Iconic Resources,  Up: X Resources
769
770 Geometry Resources
771 ------------------
772
773    To make the default size of all Emacs frames be 80 columns by 55
774 lines, do this:
775
776      Emacs*EmacsFrame.geometry: 80x55
777
778 To set the geometry of a particular frame named `fred', do this:
779
780      Emacs*fred.geometry: 80x55
781
782 Important! Do not use the following syntax:
783
784      Emacs*geometry: 80x55
785
786 You should never use `*geometry' with any X application. It does not
787 say "make the geometry of Emacs be 80 columns by 55 lines."  It really
788 says, "make Emacs and all subwindows thereof be 80x55 in whatever units
789 they care to measure in."  In particular, that is both telling the
790 Emacs text pane to be 80x55 in characters, and telling the menubar pane
791 to be 80x55 pixels, which is surely not what you want.
792
793    As a special case, this geometry specification also works (and sets
794 the default size of all Emacs frames to 80 columns by 55 lines):
795
796      Emacs.geometry: 80x55
797
798 since that is the syntax used with most other applications (since most
799 other applications have only one top-level window, unlike Emacs).  In
800 general, however, the top-level shell (the unmapped ApplicationShell
801 widget named `Emacs' that is the parent of the shell widgets that
802 actually manage the individual frames) does not have any interesting
803 resources on it, and you should set the resources on the frames instead.
804
805    The `-geometry' command-line argument sets only the geometry of the
806 initial frame created by Emacs.
807
808    A more complete explanation of geometry-handling is
809
810    * The `-geometry' command-line option sets the `Emacs.geometry'
811      resource, that is, the geometry of the ApplicationShell.
812
813    * For the first frame created, the size of the frame is taken from
814      the ApplicationShell if it is specified, otherwise from the
815      geometry of the frame.
816
817    * For subsequent frames, the order is reversed: First the frame, and
818      then the ApplicationShell.
819
820    * For the first frame created, the position of the frame is taken
821      from the ApplicationShell (`Emacs.geometry') if it is specified,
822      otherwise from the geometry of the frame.
823
824    * For subsequent frames, the position is taken only from the frame,
825      and never from the ApplicationShell.
826
827    This is rather complicated, but it does seem to provide the most
828 intuitive behavior with respect to the default sizes and positions of
829 frames created in various ways.
830
831 \1f
832 File: xemacs.info,  Node: Iconic Resources,  Next: Resource List,  Prev: Geometry Resources,  Up: X Resources
833
834 Iconic Resources
835 ----------------
836
837    Analogous to `-geometry', the `-iconic' command-line option sets the
838 iconic flag of the ApplicationShell (`Emacs.iconic') and always applies
839 to the first frame created regardless of its name.  However, it is
840 possible to set the iconic flag on particular frames (by name) by using
841 the `Emacs*FRAME-NAME.iconic' resource.
842
843 \1f
844 File: xemacs.info,  Node: Resource List,  Next: Face Resources,  Prev: Iconic Resources,  Up: X Resources
845
846 Resource List
847 -------------
848
849    Emacs frames accept the following resources:
850
851 `geometry' (class `Geometry'): string
852      Initial geometry for the frame.  *Note Geometry Resources::, for a
853      complete discussion of how this works.
854
855 `iconic' (class `Iconic'): boolean
856      Whether this frame should appear in the iconified state.
857
858 `internalBorderWidth' (class `InternalBorderWidth'): int
859      How many blank pixels to leave between the text and the edge of the
860      window.
861
862 `interline' (class `Interline'): int
863      How many pixels to leave between each line (may not be
864      implemented).
865
866 `menubar' (class `Menubar'): boolean
867      Whether newly-created frames should initially have a menubar.  Set
868      to true by default.
869
870 `initiallyUnmapped' (class `InitiallyUnmapped'): boolean
871      Whether XEmacs should leave the initial frame unmapped when it
872      starts up.  This is useful if you are starting XEmacs as a server
873      (e.g. in conjunction with gnuserv or the external client widget).
874      You can also control this with the `-unmapped' command-line option.
875
876 `barCursor' (class `BarColor'): boolean
877      Whether the cursor should be displayed as a bar, or the
878      traditional box.
879
880 `cursorColor' (class `CursorColor'): color-name
881      The color of the text cursor.
882
883 `scrollBarWidth' (class `ScrollBarWidth'): integer
884      How wide the vertical scrollbars should be, in pixels; 0 means no
885      vertical scrollbars.  You can also use a resource specification of
886      the form `*scrollbar.width', or the usual toolkit scrollbar
887      resources: `*XmScrollBar.width' (Motif), `*XlwScrollBar.width'
888      (Lucid), or `*Scrollbar.thickness' (Athena).  We don't recommend
889      that you use the toolkit resources, though, because they're
890      dependent on how exactly your particular build of XEmacs was
891      configured.
892
893 `scrollBarHeight' (class `ScrollBarHeight'): integer
894      How high the horizontal scrollbars should be, in pixels; 0 means no
895      horizontal scrollbars.  You can also use a resource specification
896      of the form `*scrollbar.height', or the usual toolkit scrollbar
897      resources: `*XmScrollBar.height' (Motif), `*XlwScrollBar.height'
898      (Lucid), or `*Scrollbar.thickness' (Athena).  We don't recommend
899      that you use the toolkit resources, though, because they're
900      dependent on how exactly your particular build of XEmacs was
901      configured.
902
903 `scrollBarPlacement' (class `ScrollBarPlacement'): string
904      Where the horizontal and vertical scrollbars should be positioned.
905      This should be one of the four strings `BOTTOM_LEFT',
906      `BOTTOM_RIGHT', `TOP_LEFT', and `TOP_RIGHT'.  Default is
907      `BOTTOM_RIGHT' for the Motif and Lucid scrollbars and
908      `BOTTOM_LEFT' for the Athena scrollbars.
909
910 `topToolBarHeight' (class `TopToolBarHeight'): integer
911 `bottomToolBarHeight' (class `BottomToolBarHeight'): integer
912 `leftToolBarWidth' (class `LeftToolBarWidth'): integer
913 `rightToolBarWidth' (class `RightToolBarWidth'): integer
914      Height and width of the four possible toolbars.
915
916 `topToolBarShadowColor' (class `TopToolBarShadowColor'): color-name
917 `bottomToolBarShadowColor' (class `BottomToolBarShadowColor'): color-name
918      Color of the top and bottom shadows for the toolbars.  NOTE: These
919      resources do *not* have anything to do with the top and bottom
920      toolbars (i.e. the toolbars at the top and bottom of the frame)!
921      Rather, they affect the top and bottom shadows around the edges of
922      all four kinds of toolbars.
923
924 `topToolBarShadowPixmap' (class `TopToolBarShadowPixmap'): pixmap-name
925 `bottomToolBarShadowPixmap' (class `BottomToolBarShadowPixmap'): pixmap-name
926      Pixmap of the top and bottom shadows for the toolbars.  If set,
927      these resources override the corresponding color resources. NOTE:
928      These resources do *not* have anything to do with the top and
929      bottom toolbars (i.e. the toolbars at the top and bottom of the
930      frame)!  Rather, they affect the top and bottom shadows around the
931      edges of all four kinds of toolbars.
932
933 `toolBarShadowThickness' (class `ToolBarShadowThickness'): integer
934      Thickness of the shadows around the toolbars, in pixels.
935
936 `visualBell' (class `VisualBell'): boolean
937      Whether XEmacs should flash the screen rather than making an
938      audible beep.
939
940 `bellVolume' (class `BellVolume'): integer
941      Volume of the audible beep.
942
943 `useBackingStore' (class `UseBackingStore'): boolean
944      Whether XEmacs should set the backing-store attribute of the X
945      windows it creates.  This increases the memory usage of the X
946      server but decreases the amount of X traffic necessary to update
947      the screen, and is useful when the connection to the X server goes
948      over a low-bandwidth line such as a modem connection.
949
950    Emacs devices accept the following resources:
951
952 `textPointer' (class `Cursor'): cursor-name
953      The cursor to use when the mouse is over text.  This resource is
954      used to initialize the variable `x-pointer-shape'.
955
956 `selectionPointer' (class `Cursor'): cursor-name
957      The cursor to use when the mouse is over a selectable text region
958      (an extent with the `highlight' property; for example, an Info
959      cross-reference).  This resource is used to initialize the variable
960      `x-selection-pointer-shape'.
961
962 `spacePointer' (class `Cursor'): cursor-name
963      The cursor to use when the mouse is over a blank space in a buffer
964      (that is, after the end of a line or after the end-of-file).  This
965      resource is used to initialize the variable
966      `x-nontext-pointer-shape'.
967
968 `modeLinePointer' (class `Cursor'): cursor-name
969      The cursor to use when the mouse is over a modeline.  This
970      resource is used to initialize the variable `x-mode-pointer-shape'.
971
972 `gcPointer' (class `Cursor'): cursor-name
973      The cursor to display when a garbage-collection is in progress.
974      This resource is used to initialize the variable
975      `x-gc-pointer-shape'.
976
977 `scrollbarPointer' (class `Cursor'): cursor-name
978      The cursor to use when the mouse is over the scrollbar.  This
979      resource is used to initialize the variable
980      `x-scrollbar-pointer-shape'.
981
982 `pointerColor' (class `Foreground'): color-name
983 `pointerBackground' (class `Background'): color-name
984      The foreground and background colors of the mouse cursor.  These
985      resources are used to initialize the variables
986      `x-pointer-foreground-color' and `x-pointer-background-color'.
987
988 \1f
989 File: xemacs.info,  Node: Face Resources,  Next: Widgets,  Prev: Resource List,  Up: X Resources
990
991 Face Resources
992 --------------
993
994    The attributes of faces are also per-frame. They can be specified as:
995
996      Emacs.FACE_NAME.parameter: value
997
998 or
999
1000      Emacs*FRAME_NAME.FACE_NAME.parameter: value
1001
1002 Faces accept the following resources:
1003
1004 `attributeFont' (class `AttributeFont'): font-name
1005      The font of this face.
1006
1007 `attributeForeground' (class `AttributeForeground'): color-name
1008 `attributeBackground' (class `AttributeBackground'): color-name
1009      The foreground and background colors of this face.
1010
1011 `attributeBackgroundPixmap' (class `AttributeBackgroundPixmap'): file-name
1012      The name of an XBM file (or XPM file, if your version of Emacs
1013      supports XPM), to use as a background stipple.
1014
1015 `attributeUnderline' (class `AttributeUnderline'): boolean
1016      Whether text in this face should be underlined.
1017
1018    All text is displayed in some face, defaulting to the face named
1019 `default'.  To set the font of normal text, use
1020 `Emacs*default.attributeFont'. To set it in the frame named `fred', use
1021 `Emacs*fred.default.attributeFont'.
1022
1023    These are the names of the predefined faces:
1024
1025 `default'
1026      Everything inherits from this.
1027
1028 `bold'
1029      If this is not specified in the resource database, Emacs tries to
1030      find a bold version of the font of the default face.
1031
1032 `italic'
1033      If this is not specified in the resource database, Emacs tries to
1034      find an italic version of the font of the default face.
1035
1036 `bold-italic'
1037      If this is not specified in the resource database, Emacs tries to
1038      find a bold-italic version of the font of the default face.
1039
1040 `modeline'
1041      This is the face that the modeline is displayed in.  If not
1042      specified in the resource database, it is determined from the
1043      default face by reversing the foreground and background colors.
1044
1045 `highlight'
1046      This is the face that highlighted extents (for example, Info
1047      cross-references and possible completions, when the mouse passes
1048      over them) are displayed in.
1049
1050 `left-margin'
1051 `right-margin'
1052      These are the faces that the left and right annotation margins are
1053      displayed in.
1054
1055 `zmacs-region'
1056      This is the face that mouse selections are displayed in.
1057
1058 `isearch'
1059      This is the face that the matched text being searched for is
1060      displayed in.
1061
1062 `info-node'
1063      This is the face of info menu items.  If unspecified, it is copied
1064      from `bold-italic'.
1065
1066 `info-xref'
1067      This is the face of info cross-references.  If unspecified, it is
1068      copied from `bold'. (Note that, when the mouse passes over a
1069      cross-reference, the cross-reference's face is determined from a
1070      combination of the `info-xref' and `highlight' faces.)
1071
1072    Other packages might define their own faces; to see a list of all
1073 faces, use any of the interactive face-manipulation commands such as
1074 `set-face-font' and type `?' when you are prompted for the name of a
1075 face.
1076
1077    If the `bold', `italic', and `bold-italic' faces are not specified
1078 in the resource database, then XEmacs attempts to derive them from the
1079 font of the default face.  It can only succeed at this if you have
1080 specified the default font using the XLFD (X Logical Font Description)
1081 format, which looks like
1082
1083      *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
1084
1085 If you use any of the other, less strict font name formats, some of
1086 which look like
1087
1088      lucidasanstypewriter-12
1089      fixed
1090      9x13
1091
1092    then XEmacs won't be able to guess the names of the bold and italic
1093 versions.  All X fonts can be referred to via XLFD-style names, so you
1094 should use those forms.  See the man pages for `X(1)', `xlsfonts(1)',
1095 and `xfontsel(1)'.
1096
1097 \1f
1098 File: xemacs.info,  Node: Widgets,  Next: Menubar Resources,  Prev: Face Resources,  Up: X Resources
1099
1100 Widgets
1101 -------
1102
1103    There are several structural widgets between the terminal EmacsFrame
1104 widget and the top level ApplicationShell; the exact names and types of
1105 these widgets change from release to release (for example, they changed
1106 between 19.8 and 19.9, 19.9 and 19.10, and 19.10 and 19.12) and are
1107 subject to further change in the future, so you should avoid mentioning
1108 them in your resource database.  The above-mentioned syntaxes should be
1109 forward- compatible.  As of 19.13, the exact widget hierarchy is as
1110 follows:
1111
1112      INVOCATION-NAME            "shell"       "container"     FRAME-NAME
1113      x-emacs-application-class  "EmacsShell"  "EmacsManager"  "EmacsFrame"
1114
1115    where INVOCATION-NAME is the terminal component of the name of the
1116 XEmacs executable (usually `xemacs'), and `x-emacs-application-class'
1117 is generally `Emacs'.
1118
1119 \1f
1120 File: xemacs.info,  Node: Menubar Resources,  Prev: Widgets,  Up: X Resources
1121
1122 Menubar Resources
1123 -----------------
1124
1125    As the menubar is implemented as a widget which is not a part of
1126 XEmacs proper, it does not use the fac" mechanism for specifying fonts
1127 and colors: It uses whatever resources are appropriate to the type of
1128 widget which is used to implement it.
1129
1130    If Emacs was compiled to use only the Motif-lookalike menu widgets,
1131 then one way to specify the font of the menubar would be
1132
1133      Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
1134
1135    If the Motif library is being used, then one would have to use
1136
1137      Emacs*menubar*fontList: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
1138
1139    because the Motif library uses the `fontList' resource name instead
1140 of `font', which has subtly different semantics.
1141
1142    The same is true of the scrollbars: They accept whichever resources
1143 are appropriate for the toolkit in use.
1144
1145 \1f
1146 File: xemacs.info,  Node: Quitting,  Next: Lossage,  Prev: Customization,  Up: Top
1147
1148 Quitting and Aborting
1149 =====================
1150
1151 `C-g'
1152      Quit.  Cancel running or partially typed command.
1153
1154 `C-]'
1155      Abort innermost recursive editing level and cancel the command
1156      which invoked it (`abort-recursive-edit').
1157
1158 `M-x top-level'
1159      Abort all recursive editing levels that are currently executing.
1160
1161 `C-x u'
1162      Cancel an already-executed command, usually (`undo').
1163
1164    There are two ways of cancelling commands which are not finished
1165 executing: "quitting" with `C-g', and "aborting" with `C-]' or `M-x
1166 top-level'.  Quitting is cancelling a partially typed command or one
1167 which is already running.  Aborting is getting out of a recursive
1168 editing level and cancelling the command that invoked the recursive
1169 edit.
1170
1171    Quitting with `C-g' is used for getting rid of a partially typed
1172 command or a numeric argument that you don't want.  It also stops a
1173 running command in the middle in a relatively safe way, so you can use
1174 it if you accidentally start executing a command that takes a long
1175 time.  In particular, it is safe to quit out of killing; either your
1176 text will ALL still be there, or it will ALL be in the kill ring (or
1177 maybe both).  Quitting an incremental search does special things
1178 documented under searching; in general, it may take two successive
1179 `C-g' characters to get out of a search.  `C-g' works by setting the
1180 variable `quit-flag' to `t' the instant `C-g' is typed; Emacs Lisp
1181 checks this variable frequently and quits if it is non-`nil'.  `C-g' is
1182 only actually executed as a command if it is typed while Emacs is
1183 waiting for input.
1184
1185    If you quit twice in a row before the first `C-g' is recognized, you
1186 activate the "emergency escape" feature and return to the shell.  *Note
1187 Emergency Escape::.
1188
1189    You can use `C-]' (`abort-recursive-edit') to get out of a recursive
1190 editing level and cancel the command which invoked it.  Quitting with
1191 `C-g' does not do this, and could not do this because it is used to
1192 cancel a partially typed command within the recursive editing level.
1193 Both operations are useful.  For example, if you are in the Emacs
1194 debugger (*note Lisp Debug::.) and have typed `C-u 8' to enter a
1195 numeric argument, you can cancel that argument with `C-g' and remain in
1196 the debugger.
1197
1198    The command `M-x top-level' is equivalent to "enough" `C-]' commands
1199 to get you out of all the levels of recursive edits that you are in.
1200 `C-]' only gets you out one level at a time, but `M-x top-level' goes
1201 out all levels at once.  Both `C-]' and `M-x top-level' are like all
1202 other commands and unlike `C-g' in that they are effective only when
1203 Emacs is ready for a command.  `C-]' is an ordinary key and has its
1204 meaning only because of its binding in the keymap.  *Note Recursive
1205 Edit::.
1206
1207    `C-x u' (`undo') is not strictly speaking a way of cancelling a
1208 command, but you can think of it as cancelling a command already
1209 finished executing.  *Note Undo::.
1210
1211 \1f
1212 File: xemacs.info,  Node: Lossage,  Next: Bugs,  Prev: Quitting,  Up: Top
1213
1214 Dealing With Emacs Trouble
1215 ==========================
1216
1217    This section describes various conditions in which Emacs fails to
1218 work, and how to recognize them and correct them.
1219
1220 * Menu:
1221
1222 * Stuck Recursive::    `[...]' in mode line around the parentheses.
1223 * Screen Garbled::     Garbage on the screen.
1224 * Text Garbled::       Garbage in the text.
1225 * Unasked-for Search:: Spontaneous entry to incremental search.
1226 * Emergency Escape::   Emergency escape--
1227                         What to do if Emacs stops responding.
1228 * Total Frustration::  When you are at your wits' end.
1229
1230 \1f
1231 File: xemacs.info,  Node: Stuck Recursive,  Next: Screen Garbled,  Prev: Lossage,  Up: Lossage
1232
1233 Recursive Editing Levels
1234 ------------------------
1235
1236    Recursive editing levels are important and useful features of Emacs,
1237 but they can seem like malfunctions to the user who does not understand
1238 them.
1239
1240    If the mode line has square brackets `[...]' around the parentheses
1241 that contain the names of the major and minor modes, you have entered a
1242 recursive editing level.  If you did not do this on purpose, or if you
1243 don't understand what that means, you should just get out of the
1244 recursive editing level.  To do so, type `M-x top-level'.  This is
1245 called getting back to top level.  *Note Recursive Edit::.
1246
1247 \1f
1248 File: xemacs.info,  Node: Screen Garbled,  Next: Text Garbled,  Prev: Stuck Recursive,  Up: Lossage
1249
1250 Garbage on the Screen
1251 ---------------------
1252
1253    If the data on the screen looks wrong, the first thing to do is see
1254 whether the text is actually wrong.  Type `C-l', to redisplay the
1255 entire screen.  If the text appears correct after this, the problem was
1256 entirely in the previous screen update.
1257
1258    Display updating problems often result from an incorrect termcap
1259 entry for the terminal you are using.  The file `etc/TERMS' in the Emacs
1260 distribution gives the fixes for known problems of this sort.
1261 `INSTALL' contains general advice for these problems in one of its
1262 sections.  Very likely there is simply insufficient padding for certain
1263 display operations.  To investigate the possibility that you have this
1264 sort of problem, try Emacs on another terminal made by a different
1265 manufacturer.  If problems happen frequently on one kind of terminal but
1266 not another kind, the real problem is likely to be a bad termcap entry,
1267 though it could also be due to a bug in Emacs that appears for terminals
1268 that have or lack specific features.
1269
1270 \1f
1271 File: xemacs.info,  Node: Text Garbled,  Next: Unasked-for Search,  Prev: Screen Garbled,  Up: Lossage
1272
1273 Garbage in the Text
1274 -------------------
1275
1276    If `C-l' shows that the text is wrong, try undoing the changes to it
1277 using `C-x u' until it gets back to a state you consider correct.  Also
1278 try `C-h l' to find out what command you typed to produce the observed
1279 results.
1280
1281    If a large portion of text appears to be missing at the beginning or
1282 end of the buffer, check for the word `Narrow' in the mode line.  If it
1283 appears, the text is still present, but marked off-limits.  To make it
1284 visible again, type `C-x n w'.  *Note Narrowing::.
1285