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