1 This is ../info/xemacs.info, produced by makeinfo version 4.0 from
4 INFO-DIR-SECTION XEmacs Editor
6 * XEmacs: (xemacs). XEmacs Editor.
9 This file documents the XEmacs editor.
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.
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.
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.
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.
33 File: xemacs.info, Node: Completion, Next: Minibuffer History, Prev: Minibuffer Edit, Up: Minibuffer
38 For certain kinds of arguments, you can use "completion" to enter
39 the argument value. Completion means that you type part of the
40 argument, then XEmacs visibly fills in the rest, or as much as can be
41 determined from the part you have typed.
43 When completion is available, certain keys--<TAB>, <RET>, and
44 <SPC>--are rebound to complete the text present in the minibuffer into
45 a longer string that it stands for, by matching it against a set of
46 "completion alternatives" provided by the command reading the argument.
47 `?' is defined to display a list of possible completions of what you
50 For example, when `M-x' uses the minibuffer to read the name of a
51 command, it provides a list of all available XEmacs command names to
52 complete against. The completion keys match the text in the minibuffer
53 against all the command names, find any additional name characters
54 implied by the ones already present in the minibuffer, and add those
55 characters to the ones you have given. This is what makes it possible
56 to type `M-x inse <SPC> b <RET>' instead of `M-x insert-buffer <RET>'
59 Case is normally significant in completion because it is significant
60 in most of the names that you can complete (buffer names, file names and
61 command names). Thus, `fo' does not complete to `Foo'. When you are
62 completing a name in which case does not matter, case may be ignored
63 for completion's sake if specified by program.
65 When a completion list is displayed, the completions will highlight
66 as you move the mouse over them. Clicking the middle mouse button on
67 any highlighted completion will "select" it just as if you had typed it
72 * Example: Completion Example.
73 * Commands: Completion Commands.
75 * Options: Completion Options.
78 File: xemacs.info, Node: Completion Example, Next: Completion Commands, Prev: Completion, Up: Completion
83 A concrete example may help here. If you type `M-x au <TAB>', the
84 <TAB> looks for alternatives (in this case, command names) that start
85 with `au'. There are several, including `auto-fill-mode' and
86 `auto-save-mode'--but they are all the same as far as `auto', so the
87 `au' in the minibuffer changes to `auto'.
89 If you type <TAB> again immediately, there are multiple
90 possibilities for the very next character--it could be any of `c-'--so
91 no more characters are added; instead, <TAB> displays a list of all
92 possible completions in another window.
94 If you go on to type `f <TAB>', this <TAB> sees `auto-f'. The only
95 command name starting this way is `auto-fill-mode', so completion fills
96 in the rest of that. You now have `auto-fill-mode' in the minibuffer
97 after typing just `au <TAB> f <TAB>'. Note that <TAB> has this effect
98 because in the minibuffer it is bound to the command
99 `minibuffer-complete' when completion is available.
102 File: xemacs.info, Node: Completion Commands, Next: Strict Completion, Prev: Completion Example, Up: Completion
107 Here is a list of the completion commands defined in the minibuffer
108 when completion is available.
111 Complete the text in the minibuffer as much as possible
112 (`minibuffer-complete').
115 Complete the minibuffer text, but don't go beyond one word
116 (`minibuffer-complete-word').
119 Submit the text in the minibuffer as the argument, possibly
120 completing first as described below
121 (`minibuffer-complete-and-exit').
124 Print a list of all possible completions of the text in the
125 minibuffer (`minibuffer-list-completions').
128 Select the highlighted text under the mouse as a minibuffer
129 response. When the minibuffer is being used to prompt the user
130 for a completion, any valid completions which are visible on the
131 screen will be highlighted when the mouse moves over them.
132 Clicking <button2> will select the highlighted completion and exit
133 the minibuffer. (`minibuf-select-highlighted-completion').
135 <SPC> completes much like <TAB>, but never goes beyond the next
136 hyphen or space. If you have `auto-f' in the minibuffer and type
137 <SPC>, it finds that the completion is `auto-fill-mode', but it stops
138 completing after `fill-'. This gives `auto-fill-'. Another <SPC> at
139 this point completes all the way to `auto-fill-mode'. <SPC> in the
140 minibuffer when completion is available runs the command
141 `minibuffer-complete-word'.
143 Here are some commands you can use to choose a completion from a
144 window that displays a list of completions:
147 Clicking mouse button 2 on a completion in the list of possible
148 completions chooses that completion (`mouse-choose-completion').
149 You normally use this command while point is in the minibuffer;
150 but you must click in the list of completions, not in the
154 Typing <RET> _in the completion list buffer_ chooses the
155 completion that point is in or next to (`choose-completion'). To
156 use this command, you must first switch windows to the window that
157 shows the list of completions.
162 Typing the right-arrow key <RIGHT>, <TAB> or `C-f' _in the
163 completion list buffer_ moves point to the following completion
164 (`next-list-mode-item').
168 Typing the left-arrow key <LEFT> or `C-b' _in the completion list
169 buffer_ moves point toward the beginning of the buffer, to the
170 previous completion (`previous-list-mode-item').
173 File: xemacs.info, Node: Strict Completion, Next: Completion Options, Prev: Completion Commands, Up: Completion
178 There are three different ways that <RET> can work in completing
179 minibuffers, depending on how the argument will be used.
181 * "Strict" completion is used when it is meaningless to give any
182 argument except one of the known alternatives. For example, when
183 `C-x k' reads the name of a buffer to kill, it is meaningless to
184 give anything but the name of an existing buffer. In strict
185 completion, <RET> refuses to exit if the text in the minibuffer
186 does not complete to an exact match.
188 * "Cautious" completion is similar to strict completion, except that
189 <RET> exits only if the text was an exact match already, not
190 needing completion. If the text is not an exact match, <RET> does
191 not exit, but it does complete the text. If it completes to an
192 exact match, a second <RET> will exit.
194 Cautious completion is used for reading file names for files that
197 * "Permissive" completion is used when any string whatever is
198 meaningful, and the list of completion alternatives is just a
199 guide. For example, when `C-x C-f' reads the name of a file to
200 visit, any file name is allowed, in case you want to create a
201 file. In permissive completion, <RET> takes the text in the
202 minibuffer exactly as given, without completing it.
204 The completion commands display a list of all possible completions in
205 a window whenever there is more than one possibility for the very next
206 character. Also, typing `?' explicitly requests such a list. If the
207 list of completions is long, you can scroll it with `C-M-v' (*note
211 File: xemacs.info, Node: Completion Options, Prev: Strict Completion, Up: Completion
216 When completion is done on file names, certain file names are usually
217 ignored. The variable `completion-ignored-extensions' contains a list
218 of strings; a file whose name ends in any of those strings is ignored
219 as a possible completion. The standard value of this variable has
220 several elements including `".o"', `".elc"', `".dvi"' and `"~"'. The
221 effect is that, for example, `foo' can complete to `foo.c' even though
222 `foo.o' exists as well. However, if _all_ the possible completions end
223 in "ignored" strings, then they are not ignored. Ignored extensions do
224 not apply to lists of completions--those always mention all possible
227 If a completion command finds the next character is undetermined, it
228 automatically displays a list of all possible completions. If the
229 variable `completion-auto-help' is set to `nil', this does not happen,
230 and you must type `?' to display the possible completions.
232 If the variable `minibuffer-confirm-incomplete' is set to `t', then
233 in contexts where `completing-read' allows answers that are not valid
234 completions, an extra <RET> must be typed to confirm the response.
235 This is helpful for catching typos.
238 File: xemacs.info, Node: Minibuffer History, Next: Repetition, Prev: Completion, Up: Minibuffer
243 Every argument that you enter with the minibuffer is saved on a
244 "minibuffer history list" so that you can use it again later in another
245 argument. Special commands load the text of an earlier argument in the
246 minibuffer. They discard the old minibuffer contents, so you can think
247 of them as moving through the history of previous arguments.
251 Move to the next earlier argument string saved in the minibuffer
252 history (`previous-history-element').
256 Move to the next later argument string saved in the minibuffer
257 history (`next-history-element').
260 Move to an earlier saved argument in the minibuffer history that
261 has a match for REGEXP (`previous-matching-history-element').
264 Move to a later saved argument in the minibuffer history that has a
265 match for REGEXP (`next-matching-history-element').
267 The simplest way to reuse the saved arguments in the history list is
268 to move through the history list one element at a time. While in the
269 minibuffer, use `M-p' or up-arrow (`previous-history-element') to "move
270 to" the next earlier minibuffer input, and use `M-n' or down-arrow
271 (`next-history-element') to "move to" the next later input.
273 The previous input that you fetch from the history entirely replaces
274 the contents of the minibuffer. To use it as the argument, exit the
275 minibuffer as usual with <RET>. You can also edit the text before you
276 reuse it; this does not change the history element that you "moved" to,
277 but your new argument does go at the end of the history list in its own
280 For many minibuffer arguments there is a "default" value. In some
281 cases, the minibuffer history commands know the default value. Then you
282 can insert the default value into the minibuffer as text by using `M-n'
283 to move "into the future" in the history.
285 There are also commands to search forward or backward through the
286 history; they search for history elements that match a regular
287 expression that you specify with the minibuffer. `M-r'
288 (`previous-matching-history-element') searches older elements in the
289 history, while `M-s' (`next-matching-history-element') searches newer
290 elements. By special dispensation, these commands can use the
291 minibuffer to read their arguments even though you are already in the
292 minibuffer when you issue them. As with incremental searching, an
293 uppercase letter in the regular expression makes the search
294 case-sensitive (*note Search Case::).
296 All uses of the minibuffer record your input on a history list, but
297 there are separate history lists for different kinds of arguments. For
298 example, there is a list for file names, used by all the commands that
301 There are several other very specific history lists, including one
302 for command names read by `M-x', one for buffer names, one for arguments
303 of commands like `query-replace', and one for compilation commands read
304 by `compile'. Finally, there is one "miscellaneous" history list that
305 most minibuffer arguments use.
308 File: xemacs.info, Node: Repetition, Prev: Minibuffer History, Up: Minibuffer
310 Repeating Minibuffer Commands
311 =============================
313 Every command that uses the minibuffer at least once is recorded on a
314 special history list, together with the values of its arguments, so that
315 you can repeat the entire command. In particular, every use of `M-x'
316 is recorded there, since `M-x' uses the minibuffer to read the command
320 Re-execute a recent minibuffer command (`repeat-complex-command').
323 Within `C-x <ESC>', move to previous recorded command
324 (`previous-history-element').
327 Within `C-x <ESC>', move to the next (more recent) recorded
328 command (`next-history-element').
330 `M-x list-command-history'
331 Display the entire command history, showing all the commands `C-x
332 <ESC> <ESC>' can repeat, most recent first.
334 `C-x <ESC> <ESC>' is used to re-execute a recent minibuffer-using
335 command. With no argument, it repeats the last such command. A
336 numeric argument specifies which command to repeat; one means the last
337 one, and larger numbers specify earlier ones.
339 `C-x <ESC> <ESC>' works by turning the previous command into a Lisp
340 expression and then entering a minibuffer initialized with the text for
341 that expression. If you type just <RET>, the command is repeated as
342 before. You can also change the command by editing the Lisp
343 expression. Whatever expression you finally submit is what will be
344 executed. The repeated command is added to the front of the command
345 history unless it is identical to the most recently executed command
348 Even if you don't understand Lisp syntax, it will probably be obvious
349 which command is displayed for repetition. If you do not change the
350 text, you can be sure the command will repeat exactly as before.
352 If you are in the minibuffer for `C-x <ESC> <ESC>' and the command
353 shown to you is not the one you want to repeat, you can move around the
354 list of previous commands using `M-n' and `M-p'. `M-p' replaces the
355 contents of the minibuffer with the next earlier recorded command, and
356 `M-n' replaces it with the next later command. After finding the
357 desired previous command, you can edit its expression and then resubmit
358 it by typing <RET>. Any editing you have done on the command to be
359 repeated is lost if you use `M-n' or `M-p'.
361 `M-n' and `M-p' are specially defined within `C-x <ESC> <ESC>' to
362 run the commands `previous-history-element' and `next-history-element'.
364 The list of previous commands using the minibuffer is stored as a
365 Lisp list in the variable `command-history'. Each element of the list
366 is a Lisp expression which describes one command and its arguments.
367 Lisp programs can reexecute a command by feeding the corresponding
368 `command-history' element to `eval'.
371 File: xemacs.info, Node: M-x, Next: Help, Prev: Minibuffer, Up: Top
373 Running Commands by Name
374 ************************
376 The Emacs commands that are used often or that must be quick to type
377 are bound to keys--short sequences of characters--for convenient use.
378 Other Emacs commands that are used more rarely are not bound to keys;
379 to run them, you must refer to them by name.
381 A command name consists, by convention, of one or more words,
382 separated by hyphens: for example, `auto-fill-mode' or `manual-entry'.
383 The use of English words makes the command name easier to remember than
384 a key made up of obscure characters, even though it results in more
385 characters to type. You can run any command by name, even if it can be
388 To run a command by name, start with `M-x', then type the command
389 name, and finish with <RET>. `M-x' uses the minibuffer to read the
390 command name. <RET> exits the minibuffer and runs the command.
392 Emacs uses the minibuffer for reading input for many different
393 purposes; on this occasion, the string `M-x' is displayed at the
394 beginning of the minibuffer as a "prompt" to remind you that your input
395 should be the name of a command to be run. *Note Minibuffer::, for
396 full information on the features of the minibuffer.
398 You can use completion to enter a command name. For example, to
399 invoke the command `forward-char', type:
401 M-x forward-char <RET>
405 After you type in `M-x fo TAB' emacs will give you a possible list of
406 completions from which you can choose. Note that `forward-char' is the
407 same command that you invoke with the key `C-f'. You can call any
408 command (interactively callable function) defined in Emacs by its name
409 using `M-x' regardless of whether or not any keys are bound to it.
411 If you type `C-g' while Emacs reads the command name, you cancel the
412 `M-x' command and get out of the minibuffer, ending up at top level.
414 To pass a numeric argument to a command you are invoking with `M-x',
415 specify the numeric argument before the `M-x'. `M-x' passes the
416 argument along to the function that it calls. The argument value
417 appears in the prompt while the command name is being read.
419 You can use the command `M-x interactive' to specify a way of
420 parsing arguments for interactive use of a function. For example,
423 (defun foo (arg) "Doc string" (interactive "p") ...use arg...)
425 to make `arg' be the prefix argument when `foo' is called as a
426 command. The call to `interactive' is actually a declaration rather
427 than a function; it tells `call-interactively' how to read arguments to
428 pass to the function. When actually called, `interactive' returns
431 The argument of INTERACTIVE is usually a string containing a code
432 letter followed by a prompt. Some code letters do not use I/O to get
433 the argument and do not need prompts. To prompt for multiple arguments,
434 you must provide a code letter, its prompt, a newline, and another code
435 letter, and so forth. If the argument is not a string, it is evaluated
436 to get a list of arguments to pass to the function. If you do not
437 provide an argument to `interactive', no arguments are passed when
438 calling interactively.
440 Available code letters are:
443 Function name: symbol with a function definition
446 Name of existing buffer
449 Name of buffer, possibly nonexistent
455 Command name: symbol with interactive function definition
458 Value of point as number (does not do I/O)
470 Possibly nonexistent file name
473 Key sequence (string)
476 Value of mark as number (does not do I/O)
479 Number read using minibuffer
482 Prefix arg converted to number, or if none, do like code `n'
485 Prefix arg converted to number (does not do I/O)
488 Prefix arg in raw form (does not do I/O)
491 Region: point and mark as two numeric arguments, smallest first
501 Variable name: symbol that is `user-variable-p'
504 Lisp expression read but not evaluated
507 Lisp expression read and evaluated
509 In addition, if the string begins with `*', an error is signaled if
510 the buffer is read-only. This happens before reading any arguments.
511 If the string begins with `@', the window the mouse is over is selected
512 before anything else is done. You may use both `@' and `*'; they are
513 processed in the order that they appear.
515 Normally, when describing a command that is run by name, we omit the
516 <RET> that is needed to terminate the name. Thus we may refer to `M-x
517 auto-fill-mode' rather than `M-x auto-fill-mode' <RET>. We mention the
518 <RET> only when it is necessary to emphasize its presence, for example,
519 when describing a sequence of input that contains a command name and
520 arguments that follow it.
522 `M-x' is defined to run the command `execute-extended-command',
523 which is responsible for reading the name of another command and
527 File: xemacs.info, Node: Help, Next: Mark, Prev: M-x, Up: Top
532 XEmacs provides extensive help features accessible through a single
533 character, `C-h'. `C-h' is a prefix key that is used only for
534 documentation-printing commands. The characters that you can type after
535 `C-h' are called "help options". One help option is `C-h'; that is how
536 you ask for help about using `C-h'. To cancel, type `C-g'. The
537 function key <F1> is equivalent to `C-h'.
539 `C-h C-h' (`help-for-help') displays a list of the possible help
540 options, and then asks you to type the desired option. It prompts with
543 A B C F I K L M N P S T V W C-c C-d C-f C-i C-k C-n C-w; ? for more help:
545 You should type one of those characters.
547 Typing a third `C-h' displays a description of what the options mean;
548 Emacs still waits for you to type an option. To cancel, type `C-g'.
550 Most help buffers use a special major mode, Help mode, which lets you
551 scroll conveniently with <SPC> and <DEL> or <BS>.
555 * Help Summary:: Brief list of all Help commands.
556 * Key Help:: Asking what a key does in XEmacs.
557 * Name Help:: Asking about a command, variable or function name.
558 * Apropos:: Asking what pertains to a given topic.
559 * Library Keywords:: Finding Lisp libraries by keywords (topics).
560 * Help Mode:: Special features of Help mode and Help buffers.
561 * Misc Help:: Other help commands.
564 File: xemacs.info, Node: Help Summary, Next: Key Help, Prev: Help, Up: Help
569 Here is a summary of the defined help commands.
572 Display a list of functions and variables whose names match REGEXP
576 Show all commands whose names contain matches for REGEXP
580 Display a table of all key bindings currently in effect, with local
581 bindings of the current major mode first, followed by all global
582 bindings (`describe-bindings').
585 Print the name of the command that KEY runs
586 (`describe-key-briefly'). Here `c' stands for `character'. For
587 more extensive information on KEY, use `C-h k'.
589 `C-h d FUNCTION <RET>'
590 `C-h f FUNCTION <RET>'
591 Display documentation on the Lisp function named FUNCTION
592 (`describe-function'). Since commands are Lisp functions, a
593 command name may be used.
596 Run Info, the program for browsing documentation files (`info').
597 The complete XEmacs manual is available online in Info.
600 Display the name and documentation of the command that KEY runs
604 Display a description of the last 100 characters you typed
608 Display documentation of the current major mode (`describe-mode').
612 Display documentation of XEmacs changes, most recent first
616 Find packages by topic keyword (`finder-by-keyword').
619 Display a table of all mouse bindings currently in effect now, with
620 local bindings of the current major mode first, followed by all
621 global bindings (`describe-pointer').
624 Display current contents of the syntax table, plus an explanation
625 of what they mean (`describe-syntax'). *Note Syntax::.
628 Enter the XEmacs interactive tutorial (`help-with-tutorial').
631 Display the documentation of the Lisp variable VAR
632 (`describe-variable').
634 `C-h w COMMAND <RET>'
635 Print which keys run the command named COMMAND (`where-is').
638 Display info on how to deal with Beta versions of XEmacs
642 Select customization buffer for GROUP (`customize').
645 View the local copy of the XEmacs FAQ (`xemacs-local-faq').
648 Read Info file FILE with Info browser (`Info-query').
650 `C-h C-c COMMAND <RET>'
651 Look up an Emacs command COMMAND in the Emacs manual in the Info
652 system (`Info-goto-emacs-command-node').
654 `C-h C-f FUNCTION <RET>'
655 Look up an Emacs Lisp function FUNCTION in the Elisp manual in the
656 Info system (`Info-elisp-ref').
659 File: xemacs.info, Node: Key Help, Next: Name Help, Prev: Help Summary, Up: Help
661 Documentation for a Key
662 =======================
664 The most basic `C-h' options are `C-h c' (`describe-key-briefly')
665 and `C-h k' (`describe-key'). `C-h c KEY' prints in the echo area the
666 name of the command that KEY is bound to. For example, `C-h c C-f'
667 prints `forward-char'. Since command names are chosen to describe what
668 the commands do, this is a good way to get a very brief description of
671 `C-h k KEY' is similar to `C-h c' but gives more information. It
672 displays the documentation string of the function KEY is bound to as
673 well as its name. KEY is a string or vector of events. When called
674 interactively, KEY may also be a menu selection. This information does
675 not usually fit into the echo area, so a window is used for the display.
677 `C-h c' and `C-h k' work for any sort of key sequences, including
678 function keys and mouse events.
681 File: xemacs.info, Node: Name Help, Next: Apropos, Prev: Key Help, Up: Help
683 Help by Command or Variable Name
684 ================================
686 `C-h f' (`describe-function') reads the name of a Lisp function
687 using the minibuffer, then displays that function's documentation
688 string in a window. Since commands are Lisp functions, you can use the
689 argument FUNCTION to get the documentation of a command that you know
690 by name. For example,
692 C-h f auto-fill-mode <RET>
694 displays the documentation for `auto-fill-mode'. Using `C-h f' is the
695 only way to see the documentation of a command that is not bound to any
696 key, that is, a command you would normally call using `M-x'. If the
697 variable `describe-function-show-arglist' is `t', `describe-function'
698 shows its arglist if the FUNCTION is not an autoload function.
700 `C-h f' is also useful for Lisp functions that you are planning to
701 use in a Lisp program. For example, if you have just written the
702 expression `(make-vector len)' and want to make sure you are using
703 `make-vector' properly, type `C-h f make-vector <RET>'. Because `C-h
704 f' allows all function names, not just command names, you may find that
705 some of your favorite abbreviations that work in `M-x' don't work in
706 `C-h f'. An abbreviation may be unique among command names, yet fail
707 to be unique when other function names are allowed.
709 The function name for `C-h f' to describe has a default which is
710 used if you type <RET> leaving the minibuffer empty. The default is
711 the function called by the innermost Lisp expression in the buffer
712 around point, _provided_ that is a valid, defined Lisp function name.
713 For example, if point is located following the text `(make-vector (car
714 x)', the innermost list containing point is the one that starts with
715 `(make-vector', so the default is to describe the function
718 `C-h f' is often useful just to verify that you have the right
719 spelling for the function name. If `C-h f' mentions a name from the
720 buffer as the default, that name must be defined as a Lisp function. If
721 that is all you want to know, just type `C-g' to cancel the `C-h f'
722 command, then go on editing.
724 `C-h w COMMAND <RET>' (`where-is') tells you what keys are bound to
725 COMMAND. It prints a list of the keys in the echo area. Alternatively,
726 it informs you that a command is not bound to any keys, which implies
727 that you must use `M-x' to call the command.
729 `C-h v' (`describe-variable') is like `C-h f' but describes Lisp
730 variables instead of Lisp functions. Its default is the Lisp symbol
731 around or before point, if that is the name of a known Lisp variable.
735 File: xemacs.info, Node: Apropos, Next: Library Keywords, Prev: Name Help, Up: Help
741 Show only symbols that are names of commands (`command-apropos').
744 Show all symbols whose names comtain matches for REGEXP.
746 A more sophisticated sort of question to ask is, "What are the
747 commands for working with files?" To ask this question, type `C-h a
748 file <RET>', which displays a list of all command names that contain
749 `file', including `copy-file', `find-file', and so on. With each
750 command name appears a brief description of how to use the command, and
751 what keys you can currently invoke it with. For example, it would say
752 that you can invoke `find-file' by typing `C-x C-f'. The `A' in `C-h
753 A' stands for `Apropos'; `C-h A' runs the command `command-apropos'.
754 This command normally checks only commands (interactive functions); if
755 you specify a prefix argument, it checks noninteractive functions as
758 Because `C-h A' looks only for functions whose names contain the
759 string you specify, you must use ingenuity in choosing the string. If
760 you are looking for commands for killing backwards and `C-h a
761 kill-backwards <RET>' doesn't reveal any, don't give up. Try just
762 `kill', or just `backwards', or just `back'. Be persistent. Pretend
763 you are playing Adventure. Also note that you can use a regular
764 expression as the argument, for more flexibility (*note Regexps::).
766 Here is a set of arguments to give to `C-h a' that covers many
767 classes of XEmacs commands, since there are strong conventions for
768 naming the standard XEmacs commands. By giving you a feel for the
769 naming conventions, this set should also serve to aid you in developing
770 a technique for picking `apropos' strings.
772 char, line, word, sentence, paragraph, region, page, sexp, list,
773 defun, rect, buffer, frame, window, face, file, dir, register,
774 mode, beginning, end, forward, backward, next, previous, up, down,
775 search, goto, kill, delete, mark, insert, yank, fill, indent,
776 case, change, set, what, list, find, view, describe, default.
778 To list all Lisp symbols that contain a match for a regexp, not just
779 the ones that are defined as commands, use the command `M-x apropos'
780 instead of `C-h A'. This command does not check key bindings by
781 default; specify a numeric argument if you want it to check them.
783 The `apropos-documentation' command is like `apropos' except that it
784 searches documentation strings for matches for the specified regular
787 The `apropos-value' command is like `apropos' except that it
788 searches symbols' values for matches for the specified regular
789 expression. This command does not check function definitions or
790 property lists by default; specify a numeric argument if you want it to
793 If the variable `apropos-do-all' is non-`nil', the commands above
794 all behave as if they had been given a prefix argument.
796 If you want more information about a function definition, variable or
797 symbol property listed in the Apropos buffer, you can click on it with
798 `Mouse-2' or move there and type <RET>.
801 File: xemacs.info, Node: Library Keywords, Next: Help Mode, Prev: Apropos, Up: Help
803 Keyword Search for Lisp Libraries
804 =================================
806 The `C-h p' command lets you search the standard Emacs Lisp
807 libraries by topic keywords. Here is a partial list of keywords you can
810 abbrev abbreviation handling, typing shortcuts, macros
811 bib code related to the `bib' bibliography processor
812 c C, C++, and Objective-C language support
813 calendar calendar and time management support
814 comm communications, networking, remote access to files
815 data support for editing files of data
816 docs support for Emacs documentation
817 dumped files preloaded into Emacs
818 emulations emulations of other editors
819 extensions Emacs Lisp language extensions
820 faces support for multiple fonts
821 frames support for Emacs frames and window systems
822 games games, jokes and amusements
823 hardware support for interfacing with exotic hardware
824 help support for on-line help systems
825 hypermedia support for links between text or other media types
826 i18n internationalization and alternate character-set support
827 internal code for Emacs internals, build process, defaults
828 languages specialized modes for editing programming languages
829 lisp Lisp support, including Emacs Lisp
830 local code local to your site
831 maint maintenance aids for the Emacs development group
832 mail modes for electronic-mail handling
833 matching various sorts of searching and matching
835 mule multi-language extensions
836 news support for netnews reading and posting
837 oop support for object-oriented programming
838 outlines support for hierarchical outlining
839 processes process, subshell, compilation, and job control support
840 terminals support for terminal types
841 tex code related to the TeX formatter
842 tools programming tools
843 unix front-ends/assistants for, or emulators of, UNIX features
844 vms support code for vms
848 File: xemacs.info, Node: Help Mode, Next: Misc Help, Prev: Library Keywords, Up: Help
853 Help buffers provide the commands of View mode (*note Misc File
854 Ops::), plus a few special commands of their own.
863 When a command name (*note Running Commands by Name: M-x.) or
864 variable name (*note Variables::) appears in the documentation, it
865 normally appears inside paired single-quotes.
868 File: xemacs.info, Node: Misc Help, Prev: Help Mode, Up: Help
873 `C-h i' (`info') runs the Info program, which is used for browsing
874 through structured documentation files. The entire XEmacs manual is
875 available within Info. Eventually all the documentation of the GNU
876 system will be available. Type `h' after entering Info to run a
877 tutorial on using Info.
879 If you specify a numeric argument, `C-h i' prompts for the name of a
880 documentation file. This way, you can browse a file which doesn't have
881 an entry in the top-level Info menu. It is also handy when you need to
882 get to the documentation quickly, and you know the exact name of the
885 There are two special help commands for accessing XEmacs
886 documentation through Info. `C-h C-f FUNCTION <RET>' enters Info and
887 goes straight to the documentation of the XEmacs function FUNCTION.
888 `C-h C-k KEY' enters Info and goes straight to the documentation of the
889 key KEY. These two keys run the commands `Info-elisp-ref' and
890 `Info-goto-emacs-key-command-node'.
892 If something surprising happens, and you are not sure what commands
893 you typed, use `C-h l' (`view-lossage'). `C-h l' prints the last 100
894 command characters you typed in. If you see commands that you don't
895 know, you can use `C-h c' to find out what they do.
897 XEmacs has several major modes. Each mode redefines a few keys and
898 makes a few other changes in how editing works. `C-h m'
899 (`describe-mode') prints documentation on the current major mode, which
900 normally describes all the commands that are changed in this mode.
902 `C-h b' (`describe-bindings') and `C-h s' (`describe-syntax')
903 present information about the current XEmacs mode that is not covered
904 by `C-h m'. `C-h b' displays a list of all the key bindings currently
905 in effect, with the local bindings of the current major mode first,
906 followed by the global bindings (*note Key Bindings::). `C-h s'
907 displays the contents of the syntax table with explanations of each
908 character's syntax (*note Syntax::).
910 You can get a similar list for a particular prefix key by typing
911 `C-h' after the prefix key. (There are a few prefix keys for which
912 this does not work--those that provide their own bindings for `C-h'.
913 One of these is <ESC>, because `<ESC> C-h' is actually `C-M-h', which
916 The other `C-h' options display various files of useful information.
917 `C-h C-w' (`describe-no-warranty') displays the full details on the
918 complete absence of warranty for XEmacs. `C-h n' (`view-emacs-news')
919 displays the file `xemacs/etc/NEWS', which contains documentation on
920 XEmacs changes arranged chronologically. `C-h F' (`xemacs-local-faq')
921 displays local version of the XEmacs
922 frequentliy-answered-questions-list. `C-h t' (`help-with-tutorial')
923 displays the learn-by-doing XEmacs tutorial. `C-h C-c'
924 (`describe-copying') displays the file `xemacs/etc/COPYING', which
925 tells you the conditions you must obey in distributing copies of
926 XEmacs. `C-h C-d' (`describe-distribution') displays another file named
927 `xemacs/etc/DISTRIB', which tells you how you can order a copy of the
928 latest version of XEmacs.
931 File: xemacs.info, Node: Mark, Next: Mouse Selection, Prev: Help, Up: Top
936 Many Emacs commands operate on an arbitrary contiguous part of the
937 current buffer. You can select text in two ways:
939 * You use special keys to select text by defining a region between
942 * If you are running XEmacs under X, you can also select text with
945 The Mark and the Region
946 =======================
948 To specify the text for a command to operate on, set "the mark" at
949 one end of it, and move point to the other end. The text between point
950 and the mark is called "the region". You can move point or the mark to
951 adjust the boundaries of the region. It doesn't matter which one is
952 set first chronologically, or which one comes earlier in the text.
954 Once the mark has been set, it remains until it is set again at
955 another place. The mark remains fixed with respect to the preceding
956 character if text is inserted or deleted in a buffer. Each Emacs
957 buffer has its own mark; when you return to a buffer that had been
958 selected previously, it has the same mark it had before.
960 Many commands that insert text, such as `C-y' (`yank') and `M-x
961 insert-buffer', position the mark at one end of the inserted text--the
962 opposite end from where point is positioned, so that the region
963 contains the text just inserted.
965 Aside from delimiting the region, the mark is useful for marking a
966 spot that you may want to go back to. To make this feature more useful,
967 Emacs remembers 16 previous locations of the mark in the `mark ring'.
971 * Setting Mark:: Commands to set the mark.
972 * Using Region:: Summary of ways to operate on contents of the region.
973 * Marking Objects:: Commands to put region around textual units.
974 * Mark Ring:: Previous mark positions saved so you can go back there.
977 File: xemacs.info, Node: Setting Mark, Next: Using Region, Prev: Mark, Up: Mark
982 Here are some commands for setting the mark:
985 Set the mark where point is (`set-mark-command').
991 Interchange mark and point (`exchange-point-and-mark').
994 Pushes a mark at the beginning of the buffer.
997 Pushes a mark at the end of the buffer.
999 For example, to convert part of the buffer to all upper-case, you
1000 can use the `C-x C-u' (`upcase-region') command, which operates on the
1001 text in the region. First go to the beginning of the text you want to
1002 capitalize and type `C-<SPC>' to put the mark there, then move to the
1003 end, and then type `C-x C-u' to capitalize the selected region. You
1004 can also set the mark at the end of the text, move to the beginning,
1005 and then type `C-x C-u'. Most commands that operate on the text in the
1006 region have the word `region' in their names.
1008 The most common way to set the mark is with the `C-<SPC>' command
1009 (`set-mark-command'). This command sets the mark where point is. You
1010 can then move point away, leaving the mark behind. It is actually
1011 incorrect to speak of the character `C-<SPC>'; there is no such
1012 character. When you type <SPC> while holding down <CTRL>, you get the
1013 character `C-@' on most terminals. This character is actually bound to
1014 `set-mark-command'. But unless you are unlucky enough to have a
1015 terminal where typing `C-<SPC>' does not produce `C-@', you should
1016 think of this character as `C-<SPC>'.
1018 Since terminals have only one cursor, Emacs cannot show you where the
1019 mark is located. Most people use the mark soon after they set it, before
1020 they forget where it is. But you can see where the mark is with the
1021 command `C-x C-x' (`exchange-point-and-mark') which puts the mark where
1022 point was and point where the mark was. The extent of the region is
1023 unchanged, but the cursor and point are now at the previous location of
1026 Another way to set the mark is to push the mark to the beginning of a
1027 buffer while leaving point at its original location. If you supply an
1028 argument to `C-<' (`mark-beginning-of-buffer'), the mark is pushed N/10
1029 of the way from the true beginning of the buffer. You can also set the
1030 mark at the end of a buffer with `C->' (`mark-end-of-buffer'). It
1031 pushes the mark to the end of the buffer, leaving point alone.
1032 Supplying an argument to the command pushes the mark N/10 of the way
1033 from the true end of the buffer.
1035 If you are using XEmacs under the X window system, you can set the
1036 variable `zmacs-regions' to `t'. This makes the current region (defined
1037 by point and mark) highlight and makes it available as the X clipboard
1038 selection, which means you can use the menu bar items on it. *Note
1039 Active Regions::, for more information.
1041 `C-x C-x' is also useful when you are satisfied with the location of
1042 point but want to move the mark; do `C-x C-x' to put point there and
1043 then you can move it. A second use of `C-x C-x', if necessary, puts
1044 the mark at the new location with point back at its original location.
1047 File: xemacs.info, Node: Using Region, Next: Marking Objects, Prev: Setting Mark, Up: Mark
1049 Operating on the Region
1050 -----------------------
1052 Once you have created an active region, you can do many things to
1054 * Kill it with `C-w' (*note Killing::).
1056 * Save it in a register with `C-x r s' (*note Registers::).
1058 * Save it in a buffer or a file (*note Accumulating Text::).
1060 * Convert case with `C-x C-l' or `C-x C-u'
1063 * Evaluate it as Lisp code with `M-x eval-region' (*note Lisp
1066 * Fill it as text with `M-q' (*note Filling::).
1068 * Print hardcopy with `M-x print-region' (*note Hardcopy::).
1070 * Indent it with `C-x <TAB>' or `C-M-\' (*note Indentation::).
1073 File: xemacs.info, Node: Marking Objects, Next: Mark Ring, Prev: Using Region, Up: Mark
1075 Commands to Mark Textual Objects
1076 --------------------------------
1078 There are commands for placing point and the mark around a textual
1079 object such as a word, list, paragraph or page.
1082 Set mark after end of next word (`mark-word'). This command and
1083 the following one do not move point.
1086 Set mark after end of next Lisp expression (`mark-sexp').
1089 Put region around current paragraph (`mark-paragraph').
1092 Put region around current Lisp defun (`mark-defun').
1095 Put region around entire buffer (`mark-whole-buffer').
1098 Put region around current page (`mark-page').
1100 `M-@' (`mark-word') puts the mark at the end of the next word, while
1101 `C-M-@' (`mark-sexp') puts it at the end of the next Lisp expression.
1102 These characters sometimes save you some typing.
1104 A number of commands are available that set both point and mark and
1105 thus delimit an object in the buffer. `M-h' (`mark-paragraph') moves
1106 point to the beginning of the paragraph that surrounds or follows
1107 point, and puts the mark at the end of that paragraph (*note
1108 Paragraphs::). You can then indent, case-convert, or kill the whole
1109 paragraph. In the same fashion, `C-M-h' (`mark-defun') puts point
1110 before and the mark after the current or following defun (*note
1111 Defuns::). `C-x C-p' (`mark-page') puts point before the current page
1112 (or the next or previous, depending on the argument), and mark at the
1113 end (*note Pages::). The mark goes after the terminating page
1114 delimiter (to include it), while point goes after the preceding page
1115 delimiter (to exclude it). Finally, `C-x h' (`mark-whole-buffer') sets
1116 up the entire buffer as the region by putting point at the beginning
1117 and the mark at the end.
1120 File: xemacs.info, Node: Mark Ring, Prev: Marking Objects, Up: Mark
1125 Aside from delimiting the region, the mark is also useful for marking
1126 a spot that you may want to go back to. To make this feature more
1127 useful, Emacs remembers 16 previous locations of the mark in the "mark
1128 ring". Most commands that set the mark push the old mark onto this
1129 ring. To return to a marked location, use `C-u C-<SPC>' (or `C-u
1130 C-@'); this is the command `set-mark-command' given a numeric argument.
1131 The command moves point to where the mark was, and restores the mark
1132 from the ring of former marks. Repeated use of this command moves point
1133 to all the old marks on the ring, one by one. The marks you have seen
1134 go to the end of the ring, so no marks are lost.
1136 Each buffer has its own mark ring. All editing commands use the
1137 current buffer's mark ring. In particular, `C-u C-<SPC>' always stays
1140 Many commands that can move long distances, such as `M-<'
1141 (`beginning-of-buffer'), start by setting the mark and saving the old
1142 mark on the mark ring. This makes it easier for you to move back
1143 later. Searches set the mark, unless they do not actually move point.
1144 When a command sets the mark, `Mark Set' is printed in the echo area.
1146 The variable `mark-ring-max' is the maximum number of entries to
1147 keep in the mark ring. If that many entries exist and another entry is
1148 added, the last entry in the list is discarded. Repeating `C-u
1149 C-<SPC>' circulates through the entries that are currently in the ring.
1151 The variable `mark-ring' holds the mark ring itself, as a list of
1152 marker objects in the order most recent first. This variable is local
1156 File: xemacs.info, Node: Mouse Selection, Next: Additional Mouse Operations, Prev: Mark, Up: Top
1158 Selecting Text with the Mouse
1159 =============================
1161 If you are using XEmacs under X, you can use the mouse pointer to
1162 select text. (The normal mouse pointer is an I-beam, the same pointer
1165 The glyph variable `text-pointer-glyph' controls the shape of the
1166 mouse pointer when over text. You can also control the shape of the
1167 mouse pointer when over nontext using `nontext-pointer-glyph', and the
1168 shape of the mouse pointer when over the modeline using
1169 `modeline-pointer-glyph'. (Remember, you should use `set-glyph-image',
1170 not `setq', to set one of these variables.)
1172 If you want to get fancy, you can set the foreground and background
1173 colors of the mouse pointer by setting the `pointer' face.
1175 There are two ways to select a region of text with the mouse:
1177 To select a word in text, double-click with the left mouse button
1178 while the mouse cursor is over the word. The word is highlighted when
1179 selected. On monochrome monitors, a stippled background indicates that a
1180 region of text has been highlighted. On color monitors, a color
1181 background indicates highlighted text. You can triple-click to select
1184 To select an arbitrary region of text:
1186 1. Move the mouse cursor over the character at the beginning of the
1187 region of text you want to select.
1189 2. Press and hold the left mouse button.
1191 3. While holding the left mouse button down, drag the cursor to the
1192 character at the end of the region of text you want to select.
1194 4. Release the left mouse button.
1195 The selected region of text is highlighted.
1197 Once a region of text is selected, it becomes the primary X selection
1198 (*note Using X Selections::) as well as the Emacs selected region. You
1199 can paste it into other X applications and use the options from the
1200 Edit pull-down menu on it. Since it is also the Emacs region, you can
1201 use Emacs region commands on it.