comparison man/basic.texi @ 88155:d7ddb3e565de

sync with trunk
author Henrik Enberg <henrik.enberg@telia.com>
date Mon, 16 Jan 2006 00:03:54 +0000
parents 23a1cea22d13
children
comparison
equal deleted inserted replaced
88154:8ce476d3ba36 88155:d7ddb3e565de
1 @c This is part of the Emacs manual. 1 @c This is part of the Emacs manual.
2 @c Copyright (C) 1985,86,87,93,94,95,97,2000,2001 Free Software Foundation, Inc. 2 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
3 @c 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3 @c See file emacs.texi for copying conditions. 4 @c See file emacs.texi for copying conditions.
4 @node Basic, Minibuffer, Exiting, Top 5 @node Basic, Minibuffer, Exiting, Top
5 @chapter Basic Editing Commands 6 @chapter Basic Editing Commands
6 7
7 @kindex C-h t 8 @kindex C-h t
60 with text-only terminals, you will need to tell Emacs which key to use 61 with text-only terminals, you will need to tell Emacs which key to use
61 for that purpose. If the large key not far above the @key{RET} or 62 for that purpose. If the large key not far above the @key{RET} or
62 @key{ENTER} key doesn't delete backwards, you need to do this. 63 @key{ENTER} key doesn't delete backwards, you need to do this.
63 @xref{DEL Does Not Delete}, for an explanation of how. 64 @xref{DEL Does Not Delete}, for an explanation of how.
64 65
65 Most PC keyboards have both a @key{BACKSPACE} key a short ways above 66 Most PC keyboards have both a @key{BACKSPACE} key not far above
66 @key{RET} or @key{ENTER}, and a @key{DELETE} key elsewhere. On these 67 @key{RET} or @key{ENTER}, and a @key{DELETE} key elsewhere. On these
67 keyboards, Emacs supports when possible the usual convention that the 68 keyboards, Emacs supports when possible the usual convention that the
68 @key{BACKSPACE} key deletes backwards (it is @key{DEL}), while the 69 @key{BACKSPACE} key deletes backwards (it is @key{DEL}), while the
69 @key{DELETE} key deletes ``forwards,'' deleting the character after 70 @key{DELETE} key deletes ``forwards,'' deleting the character after
70 point, the one underneath the cursor, like @kbd{C-d} (see below). 71 point, the one underneath the cursor, like @kbd{C-d} (see below).
71 72
72 @kindex RET 73 @kindex RET
73 @cindex newline 74 @cindex newline
74 To end a line and start typing a new one, type @key{RET}. This 75 To end a line and start typing a new one, type @key{RET}. This
75 inserts a newline character in the buffer. If point is in the middle of 76 inserts a newline character in the buffer. If point is in the middle of
76 a line, @key{RET} splits the line. Typing @key{DEL} when the cursor is 77 a line, the effect is to split the line. Typing @key{DEL} when the cursor is
77 at the beginning of a line deletes the preceding newline, thus joining 78 at the beginning of a line deletes the preceding newline, thus joining
78 the line with the preceding line. 79 the line with the preceding line.
79 80
80 Emacs can split lines automatically when they become too long, if you 81 Emacs can split lines automatically when they become too long, if you
81 turn on a special minor mode called @dfn{Auto Fill} mode. 82 turn on a special minor mode called @dfn{Auto Fill} mode.
168 @kindex M-r 169 @kindex M-r
169 @kindex LEFT 170 @kindex LEFT
170 @kindex RIGHT 171 @kindex RIGHT
171 @kindex UP 172 @kindex UP
172 @kindex DOWN 173 @kindex DOWN
173 @findex beginning-of-line 174 @findex move-beginning-of-line
174 @findex end-of-line 175 @findex move-end-of-line
175 @findex forward-char 176 @findex forward-char
176 @findex backward-char 177 @findex backward-char
177 @findex next-line 178 @findex next-line
178 @findex previous-line 179 @findex previous-line
179 @findex beginning-of-buffer 180 @findex beginning-of-buffer
181 @findex goto-char 182 @findex goto-char
182 @findex goto-line 183 @findex goto-line
183 @findex move-to-window-line 184 @findex move-to-window-line
184 @table @kbd 185 @table @kbd
185 @item C-a 186 @item C-a
186 Move to the beginning of the line (@code{beginning-of-line}). 187 Move to the beginning of the line (@code{move-beginning-of-line}).
187 @item C-e 188 @item C-e
188 Move to the end of the line (@code{end-of-line}). 189 Move to the end of the line (@code{move-end-of-line}).
189 @item C-f 190 @item C-f
190 Move forward one character (@code{forward-char}). The right-arrow key 191 Move forward one character (@code{forward-char}). The right-arrow key
191 does the same thing. 192 does the same thing.
192 @item C-b 193 @item C-b
193 Move backward one character (@code{backward-char}). The left-arrow 194 Move backward one character (@code{backward-char}). The left-arrow
217 numeric argument @var{n}, move to @var{n}/10 of the way from the top. 218 numeric argument @var{n}, move to @var{n}/10 of the way from the top.
218 @xref{Arguments}, for more information on numeric arguments.@refill 219 @xref{Arguments}, for more information on numeric arguments.@refill
219 @item M-> 220 @item M->
220 Move to the end of the buffer (@code{end-of-buffer}). 221 Move to the end of the buffer (@code{end-of-buffer}).
221 @item C-v 222 @item C-v
222 Scroll the display one screen forward, and move point if necessary to put 223 @itemx @key{PAGEDOWN}
223 it on the screen (@code{scroll-up}). This doesn't always 224 @itemx @key{PRIOR}
224 move point, but it is commonly used to do so. 225 Scroll the display one screen forward, and move point if necessary to
225 If your keyboard has a @key{PAGEDOWN} key, it does the same thing. 226 put it on the screen (@code{scroll-up}). This doesn't always move
227 point, but it is commonly used to do so. If your keyboard has a
228 @key{PAGEDOWN} or @key{PRIOR} key, it does the same thing.
226 229
227 Scrolling commands are further described in @ref{Scrolling}. 230 Scrolling commands are further described in @ref{Scrolling}.
228 @item M-v 231 @item M-v
232 @itemx @key{PAGEUP}
233 @itemx @key{NEXT}
229 Scroll one screen backward, and move point if necessary to put it on 234 Scroll one screen backward, and move point if necessary to put it on
230 the screen (@code{scroll-down}). This doesn't always move point, but 235 the screen (@code{scroll-down}). This doesn't always move point, but
231 it is commonly used to do so. The @key{PAGEUP} key has the same 236 it is commonly used to do so. If your keyboard has a @key{PAGEUP} or
232 effect. 237 @key{NEXT} key, it does the same thing.
233 @item M-x goto-char 238 @item M-x goto-char
234 Read a number @var{n} and move point to buffer position @var{n}. 239 Read a number @var{n} and move point to buffer position @var{n}.
235 Position 1 is the beginning of the buffer. 240 Position 1 is the beginning of the buffer.
236 @item M-x goto-line 241 @item M-g M-g
237 Read a number @var{n} and move point to line number @var{n}. Line 1 242 @itemx M-g g
238 is the beginning of the buffer. 243 @itemx M-x goto-line
244 Read a number @var{n} and move point to the beginning of line number
245 @var{n}. Line 1 is the beginning of the buffer. If point is on or
246 just after a number, then that is the default for @var{n}, if you just
247 press @key{RET} with an empty minibuffer.
239 @item C-x C-n 248 @item C-x C-n
240 @findex set-goal-column 249 @findex set-goal-column
241 @kindex C-x C-n 250 @kindex C-x C-n
242 Use the current column of point as the @dfn{semipermanent goal column} for 251 Use the current column of point as the @dfn{semipermanent goal column} for
243 @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). Henceforth, those 252 @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). Henceforth, those
254 then @kbd{C-n} and @kbd{C-p}, when starting at the end of the line, move 263 then @kbd{C-n} and @kbd{C-p}, when starting at the end of the line, move
255 to the end of another line. Normally, @code{track-eol} is @code{nil}. 264 to the end of another line. Normally, @code{track-eol} is @code{nil}.
256 @xref{Variables}, for how to set variables such as @code{track-eol}. 265 @xref{Variables}, for how to set variables such as @code{track-eol}.
257 266
258 @vindex next-line-add-newlines 267 @vindex next-line-add-newlines
259 @kbd{C-n} normally gets an error when you use it on the last line of 268 @kbd{C-n} normally stops at the end of the buffer when you use it on
260 the buffer (just as @kbd{C-p} gets an error on the first line). But 269 the last line of the buffer. But if you set the variable
261 if you set the variable @code{next-line-add-newlines} to a 270 @code{next-line-add-newlines} to a non-@code{nil} value, @kbd{C-n} on
262 non-@code{nil} value, @kbd{C-n} on the last line of a buffer creates 271 the last line of a buffer creates an additional line at the end and
263 an additional line at the end and moves down onto it. 272 moves down onto it.
264 273
265 @node Erasing 274 @node Erasing
266 @section Erasing Text 275 @section Erasing Text
267 276
268 @table @kbd 277 @table @kbd
317 326
318 @table @kbd 327 @table @kbd
319 @item C-x u 328 @item C-x u
320 Undo one batch of changes---usually, one command worth (@code{undo}). 329 Undo one batch of changes---usually, one command worth (@code{undo}).
321 @item C-_ 330 @item C-_
331 @itemx C-/
322 The same. 332 The same.
323 @item C-u C-x u 333 @item C-u C-x u
324 Undo one batch of changes in the region. 334 Undo one batch of changes in the region.
325 @end table 335 @end table
326 336
327 @kindex C-x u 337 @kindex C-x u
328 @kindex C-_ 338 @kindex C-_
339 @kindex C-/
329 @findex undo 340 @findex undo
330 The command @kbd{C-x u} or @kbd{C-_} is how you undo. The first time 341 The command @kbd{C-x u} (or @kbd{C-_} or @kbd{C-/}) is how you undo.
331 you give this command, it undoes the last change. Point moves back to 342 The first time you give this command, it undoes the last change.
332 where it was before the command that made the change. 343 Point moves back to where it was before the command that made the
344 change.
333 345
334 Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and 346 Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and
335 earlier changes, back to the limit of the undo information available. 347 earlier changes, back to the limit of the undo information available.
336 If all recorded changes have already been undone, the undo command 348 If all recorded changes have already been undone, the undo command
337 displays an error message and does nothing. 349 displays an error message and does nothing.
338 350
351 @findex undo-only
339 Any command other than an undo command breaks the sequence of undo 352 Any command other than an undo command breaks the sequence of undo
340 commands. Starting from that moment, the previous undo commands become 353 commands. Starting from that moment, the previous undo commands become
341 ordinary changes that you can undo. Thus, to redo changes you have 354 ordinary changes that you can undo. Thus, to redo changes you have
342 undone, type @kbd{C-f} or any other command that will harmlessly break 355 undone, type @kbd{C-f} or any other command that will harmlessly break
343 the sequence of undoing, then type more undo commands. 356 the sequence of undoing, then type more undo commands. On the other
357 hand, if you want to ignore previous undo commands, use @kbd{M-x
358 undo-only}. This is like @code{undo}, but will not redo changes
359 you have just undone.
344 360
345 @cindex selective undo 361 @cindex selective undo
346 @kindex C-u C-x u 362 @kindex C-u C-x u
347 Ordinary undo applies to all changes made in the current buffer. You 363 Ordinary undo applies to all changes made in the current buffer. You
348 can also perform @dfn{selective undo}, limited to the current region. 364 can also perform @dfn{selective undo}, limited to the current region
365 (@pxref{Mark}).
349 To do this, specify the region you want, then run the @code{undo} 366 To do this, specify the region you want, then run the @code{undo}
350 command with a prefix argument (the value does not matter): @kbd{C-u C-x 367 command with a prefix argument (the value does not matter): @kbd{C-u C-x
351 u} or @kbd{C-u C-_}. This undoes the most recent change in the region. 368 u} or @kbd{C-u C-_}. This undoes the most recent change in the region.
352 To undo further changes in the same region, repeat the @code{undo} 369 To undo further changes in the same region, repeat the @code{undo}
353 command (no prefix argument is needed). In Transient Mark mode, any use 370 command (no prefix argument is needed). In Transient Mark mode
354 of @code{undo} when there is an active region performs selective undo; 371 (@pxref{Transient Mark}), any use of @code{undo} when there is an
355 you do not need a prefix argument. 372 active region performs selective undo; you do not need a prefix
373 argument.
356 374
357 If you notice that a buffer has been modified accidentally, the 375 If you notice that a buffer has been modified accidentally, the
358 easiest way to recover is to type @kbd{C-_} repeatedly until the stars 376 easiest way to recover is to type @kbd{C-_} repeatedly until the stars
359 disappear from the front of the mode line. At this time, all the 377 disappear from the front of the mode line. At this time, all the
360 modifications you made have been canceled. Whenever an undo command 378 modifications you made have been canceled. Whenever an undo command
378 move back to the neighborhoods you have moved through by popping the 396 move back to the neighborhoods you have moved through by popping the
379 mark ring (@pxref{Mark Ring}). 397 mark ring (@pxref{Mark Ring}).
380 398
381 @vindex undo-limit 399 @vindex undo-limit
382 @vindex undo-strong-limit 400 @vindex undo-strong-limit
401 @vindex undo-outer-limit
383 @cindex undo limit 402 @cindex undo limit
384 When the undo information for a buffer becomes too large, Emacs 403 When the undo information for a buffer becomes too large, Emacs
385 discards the oldest undo information from time to time (during garbage 404 discards the oldest undo information from time to time (during garbage
386 collection). You can specify how much undo information to keep by 405 collection). You can specify how much undo information to keep by
387 setting two variables: @code{undo-limit} and @code{undo-strong-limit}. 406 setting three variables: @code{undo-limit}, @code{undo-strong-limit},
388 Their values are expressed in units of bytes of space. 407 and @code{undo-outer-limit}. Their values are expressed in units of
408 bytes of space.
389 409
390 The variable @code{undo-limit} sets a soft limit: Emacs keeps undo 410 The variable @code{undo-limit} sets a soft limit: Emacs keeps undo
391 data for enough commands to reach this size, and perhaps exceed it, but 411 data for enough commands to reach this size, and perhaps exceed it,
392 does not keep data for any earlier commands beyond that. Its default 412 but does not keep data for any earlier commands beyond that. Its
393 value is 20000. The variable @code{undo-strong-limit} sets a stricter 413 default value is 20000. The variable @code{undo-strong-limit} sets a
394 limit: the command which pushes the size past this amount is itself 414 stricter limit: a previous command (not the most recent one) which
395 forgotten. Its default value is 30000. 415 pushes the size past this amount is itself forgotten. The default
396 416 value of @code{undo-strong-limit} is 30000.
397 Regardless of the values of those variables, the most recent change is 417
398 never discarded, so there is no danger that garbage collection occurring 418 Regardless of the values of those variables, the most recent change
399 right after an unintentional large change might prevent you from undoing 419 is never discarded unless it gets bigger than @code{undo-outer-limit}
400 it. 420 (normally 3,000,000). At that point, Emacs discards the undo data and
401 421 warns you about it. This is the only situation in which you cannot
402 The reason the @code{undo} command has two keys, @kbd{C-x u} and 422 undo the last command. If this happens, you can increase the value of
403 @kbd{C-_}, set up to run it is that it is worthy of a single-character 423 @code{undo-outer-limit} to make it even less likely to happen in the
404 key, but on some keyboards it is not obvious how to type @kbd{C-_}. 424 future. But if you didn't expect the command to create such large
405 @kbd{C-x u} is an alternative you can type straightforwardly on any 425 undo data, then it is probably a bug and you should report it.
406 terminal. 426 @xref{Bugs,, Reporting Bugs}.
427
428 The reason the @code{undo} command has three key bindings, @kbd{C-x
429 u}, @kbd{C-_} and @kbd{C-/}, is that it is worthy of a
430 single-character key, but @kbd{C-x u} is more straightforward for
431 beginners to type.
407 432
408 @node Basic Files 433 @node Basic Files
409 @section Files 434 @section Files
410 435
411 The commands described above are sufficient for creating and altering 436 The commands described above are sufficient for creating and altering
487 type the text for the new line. @kbd{C-o F O O} has the same effect as 512 type the text for the new line. @kbd{C-o F O O} has the same effect as
488 @w{@kbd{F O O @key{RET}}}, except for the final location of point. 513 @w{@kbd{F O O @key{RET}}}, except for the final location of point.
489 514
490 You can make several blank lines by typing @kbd{C-o} several times, or 515 You can make several blank lines by typing @kbd{C-o} several times, or
491 by giving it a numeric argument to tell it how many blank lines to make. 516 by giving it a numeric argument to tell it how many blank lines to make.
492 @xref{Arguments}, for how. If you have a fill prefix, then @kbd{C-o} 517 @xref{Arguments}, for how. If you have a fill prefix, the @kbd{C-o}
493 command inserts the fill prefix on the new line, when you use it at the 518 command inserts the fill prefix on the new line, when you use it at the
494 beginning of a line. @xref{Fill Prefix}. 519 beginning of a line. @xref{Fill Prefix}.
495 520
496 The easy way to get rid of extra blank lines is with the command 521 The easy way to get rid of extra blank lines is with the command
497 @kbd{C-x C-o} (@code{delete-blank-lines}). @kbd{C-x C-o} in a run of 522 @kbd{C-x C-o} (@code{delete-blank-lines}). @kbd{C-x C-o} in a run of
526 551
527 Sometimes it is nice to have Emacs insert newlines automatically when 552 Sometimes it is nice to have Emacs insert newlines automatically when
528 a line gets too long. Continuation on the screen does not do that. Use 553 a line gets too long. Continuation on the screen does not do that. Use
529 Auto Fill mode (@pxref{Filling}) if that's what you want. 554 Auto Fill mode (@pxref{Filling}) if that's what you want.
530 555
531 @vindex truncate-lines
532 @cindex truncation 556 @cindex truncation
533 @cindex line truncation, and fringes 557 @cindex line truncation, and fringes
534 As an alternative to continuation, Emacs can display long lines by 558 As an alternative to continuation, Emacs can display long lines by
535 @dfn{truncation}. This means that all the characters that do not fit 559 @dfn{truncation}. This means that all the characters that do not fit
536 in the width of the screen or window do not appear at all. They 560 in the width of the screen or window do not appear at all. @samp{$}
537 remain in the buffer, temporarily invisible. On terminals, @samp{$} 561 in the last column or a small straight arrow in the fringe to the
538 in the last column informs you that the line has been truncated on the 562 right of the window indicates a truncated line.
539 display. On window systems, a small straight arrow in the fringe to 563
540 the right of the window indicates a truncated line. 564 @xref{Display Custom}, for more information about line truncation,
541 565 and other variables that affect how text is displayed.
542 @findex toggle-truncate-lines
543 Truncation instead of continuation happens whenever horizontal
544 scrolling is in use, and optionally in all side-by-side windows
545 (@pxref{Windows}). You can enable or disable truncation for a
546 particular buffer with the command @kbd{M-x toggle-truncate-lines}.
547
548 @xref{Display Custom}, for additional variables that affect how text is
549 displayed.
550 566
551 @node Position Info 567 @node Position Info
552 @section Cursor Position Information 568 @section Cursor Position Information
553 569
554 Here are commands to get information about the size and position of 570 Here are commands to get information about the size and position of
570 Display the character code of character after point, character position of 586 Display the character code of character after point, character position of
571 point, and column of point (@code{what-cursor-position}). 587 point, and column of point (@code{what-cursor-position}).
572 @item M-x hl-line-mode 588 @item M-x hl-line-mode
573 Enable or disable highlighting of the current line. @xref{Cursor 589 Enable or disable highlighting of the current line. @xref{Cursor
574 Display}. 590 Display}.
591 @item M-x size-indication-mode
592 Toggle automatic display of the size of the buffer.
593 @xref{Optional Mode Line}.
575 @end table 594 @end table
576 595
577 @findex what-page 596 @findex what-page
578 @findex what-line 597 @findex what-line
579 @cindex line number commands 598 @cindex line number commands
580 @cindex location of point 599 @cindex location of point
581 @cindex cursor location 600 @cindex cursor location
582 @cindex point location 601 @cindex point location
583 There are two commands for working with line numbers. @kbd{M-x 602 @kbd{M-x what-line} computes the current line number and displays it
584 what-line} computes the current line number and displays it in the echo 603 in the echo area. You can also see the current line number in the
585 area. To go to a given line by number, use @kbd{M-x goto-line}; it 604 mode line; see @ref{Mode Line}. If you narrow the buffer, then the
586 prompts you for the number. These line numbers count from one at the 605 line number in the mode line is relative to the accessible portion
587 beginning of the buffer. 606 (@pxref{Narrowing}). By contrast, @code{what-line} shows both the
588 607 line number relative to the narrowed region and the line number
589 You can also see the current line number in the mode line; see @ref{Mode 608 relative to the whole buffer.
590 Line}. If you narrow the buffer, then the line number in the mode line
591 is relative to the accessible portion (@pxref{Narrowing}). By contrast,
592 @code{what-line} shows both the line number relative to the narrowed
593 region and the line number relative to the whole buffer.
594 609
595 @kbd{M-x what-page} counts pages from the beginning of the file, and 610 @kbd{M-x what-page} counts pages from the beginning of the file, and
596 counts lines within the page, showing both numbers in the echo area. 611 counts lines within the page, showing both numbers in the echo area.
597 @xref{Pages}. 612 @xref{Pages}.
598 613
609 column the cursor is in, and other miscellaneous information about 624 column the cursor is in, and other miscellaneous information about
610 point and the character after it. It displays a line in the echo area 625 point and the character after it. It displays a line in the echo area
611 that looks like this: 626 that looks like this:
612 627
613 @smallexample 628 @smallexample
614 Char: c (0143, 99, 0x63) point=21044 of 26883(78%) column 53 629 Char: c (99, #o143, #x63) point=28062 of 36168 (78%) column=53
615 @end smallexample 630 @end smallexample
616
617 @noindent
618 (In fact, this is the output produced when point is before the
619 @samp{column} in the example.)
620 631
621 The four values after @samp{Char:} describe the character that follows 632 The four values after @samp{Char:} describe the character that follows
622 point, first by showing it and then by giving its character code in 633 point, first by showing it and then by giving its character code in
623 octal, decimal and hex. For a non-ASCII multibyte character, these are 634 decimal, octal and hex. For a non-@acronym{ASCII} multibyte character, these are
624 followed by @samp{ext} and the character's representation, in hex, in 635 followed by @samp{file} and the character's representation, in hex, in
625 the buffer's coding system, if that coding system encodes the character 636 the buffer's coding system, if that coding system encodes the character
626 safely and with a single byte (@pxref{Coding Systems}). If the 637 safely and with a single byte (@pxref{Coding Systems}). If the
627 character's encoding is longer than one byte, Emacs shows @samp{ext ...}. 638 character's encoding is longer than one byte, Emacs shows @samp{file ...}.
639
640 However, if the character displayed is in the range 0200 through
641 0377 octal, it may actually stand for an invalid UTF-8 byte read from
642 a file. In Emacs, that byte is represented as a sequence of 8-bit
643 characters, but all of them together display as the original invalid
644 byte, in octal code. In this case, @kbd{C-x =} shows @samp{part of
645 display ...} instead of @samp{file}.
628 646
629 @samp{point=} is followed by the position of point expressed as a character 647 @samp{point=} is followed by the position of point expressed as a character
630 count. The front of the buffer counts as position 1, one character later 648 count. The front of the buffer counts as position 1, one character later
631 as 2, and so on. The next, larger, number is the total number of characters 649 as 2, and so on. The next, larger, number is the total number of characters
632 in the buffer. Afterward in parentheses comes the position expressed as a 650 in the buffer. Afterward in parentheses comes the position expressed as a
633 percentage of the total size. 651 percentage of the total size.
634 652
635 @samp{column} is followed by the horizontal position of point, in 653 @samp{column=} is followed by the horizontal position of point, in
636 columns from the left edge of the window. 654 columns from the left edge of the window.
637 655
638 If the buffer has been narrowed, making some of the text at the 656 If the buffer has been narrowed, making some of the text at the
639 beginning and the end temporarily inaccessible, @kbd{C-x =} displays 657 beginning and the end temporarily inaccessible, @kbd{C-x =} displays
640 additional text describing the currently accessible range. For example, it 658 additional text describing the currently accessible range. For example, it
641 might display this: 659 might display this:
642 660
643 @smallexample 661 @smallexample
644 Char: C (0103, 67, 0x43) point=252 of 889(28%) <231 - 599> column 0 662 Char: C (67, #o103, #x43) point=252 of 889 (28%) <231-599> column=0
645 @end smallexample 663 @end smallexample
646 664
647 @noindent 665 @noindent
648 where the two extra numbers give the smallest and largest character 666 where the two extra numbers give the smallest and largest character
649 position that point is allowed to assume. The characters between those 667 position that point is allowed to assume. The characters between those
652 If point is at the end of the buffer (or the end of the accessible 670 If point is at the end of the buffer (or the end of the accessible
653 part), the @w{@kbd{C-x =}} output does not describe a character after 671 part), the @w{@kbd{C-x =}} output does not describe a character after
654 point. The output might look like this: 672 point. The output might look like this:
655 673
656 @smallexample 674 @smallexample
657 point=26957 of 26956(100%) column 0 675 point=36169 of 36168 (EOB) column=0
658 @end smallexample 676 @end smallexample
659 677
660 @cindex character set of character at point 678 @cindex character set of character at point
661 @cindex font of character at point 679 @cindex font of character at point
662 @cindex text properties at point 680 @cindex text properties at point
663 @w{@kbd{C-u C-x =}} displays additional information about a 681 @w{@kbd{C-u C-x =}} displays the following additional information about a
664 character, including the character set name and the codes that 682 character.
665 identify the character within that character set; ASCII characters are 683
666 identified as belonging to the @code{ascii} character set. It also 684 @itemize @bullet
667 shows the character's syntax, categories, and encodings both 685 @item
668 internally in the buffer and externally if you save the file. It also 686 The character set name, and the codes that identify the character
669 shows the character's text properties (@pxref{Text Properties,,, 687 within that character set; @acronym{ASCII} characters are identified
688 as belonging to the @code{ascii} character set.
689
690 @item
691 The character's syntax and categories.
692
693 @item
694 The character's encodings, both internally in the buffer, and externally
695 if you were to save the file.
696
697 @item
698 What to type to input the character in the current input method
699 (if it supports the character).
700
701 @item
702 If you are running Emacs on a window system, the font name and glyph
703 code for the character. If you are running Emacs on a terminal, the
704 code(s) sent to the terminal.
705
706 @item
707 The character's text properties (@pxref{Text Properties,,,
670 elisp, the Emacs Lisp Reference Manual}), and any overlays containing it 708 elisp, the Emacs Lisp Reference Manual}), and any overlays containing it
671 (@pxref{Overlays,,, elisp, the same manual}). 709 (@pxref{Overlays,,, elisp, the same manual}).
710 @end itemize
672 711
673 Here's an example showing the Latin-1 character A with grave accent, 712 Here's an example showing the Latin-1 character A with grave accent,
674 in a buffer whose coding system is @code{iso-2022-7bit}, whose 713 in a buffer whose coding system is @code{iso-latin-1}, whose
675 terminal coding system is @code{iso-latin-1} (so the terminal actually 714 terminal coding system is @code{iso-latin-1} (so the terminal actually
676 displays the character as @samp{@`A}), and which has font-lock-mode 715 displays the character as @samp{@`A}), and which has font-lock-mode
677 (@pxref{Font Lock}) enabled: 716 (@pxref{Font Lock}) enabled:
678 717
679 @smallexample 718 @smallexample
680 character: @`A (04300, 2240, 0x8c0) 719 character: @`A (2240, #o4300, #x8c0, U+00C0)
681 charset: latin-iso8859-1 720 charset: latin-iso8859-1
682 (Right-Hand Part of Latin Alphabet 1@dots{} 721 (Right-Hand Part of Latin Alphabet 1@dots{}
683 code point: 64 722 code point: #x40
684 syntax: w which means: word 723 syntax: w which means: word
685 category: l:Latin 724 category: l:Latin
686 buffer code: 0x81 0xC0 725 to input: type "`A" with latin-1-prefix
687 file code: ESC 2C 41 40 (encoded by coding system iso-2022-7bit) 726 buffer code: #x81 #xC0
688 terminal code: C0 727 file code: #xC0 (encoded by coding system iso-latin-1)
689 728 display: terminal code #xC0
690 Text properties 729
691 font-lock-face: font-lock-variable-name-face 730 There are text properties here:
692 fontified: t 731 fontified t
693 @end smallexample 732 @end smallexample
694 733
695 @node Arguments 734 @node Arguments
696 @section Numeric Arguments 735 @section Numeric Arguments
697 @cindex numeric arguments 736 @cindex numeric arguments
709 748
710 @kindex M-1 749 @kindex M-1
711 @kindex M-@t{-} 750 @kindex M-@t{-}
712 @findex digit-argument 751 @findex digit-argument
713 @findex negative-argument 752 @findex negative-argument
714 If your terminal keyboard has a @key{META} key, the easiest way to 753 If your terminal keyboard has a @key{META} key (labeled @key{ALT} on
715 specify a numeric argument is to type digits and/or a minus sign while 754 PC keyboards), the easiest way to specify a numeric argument is to
716 holding down the @key{META} key. For example, 755 type digits and/or a minus sign while holding down the @key{META} key.
756 For example,
717 757
718 @example 758 @example
719 M-5 C-n 759 M-5 C-n
720 @end example 760 @end example
721 761
764 @kbd{C-k}.)@refill 804 @kbd{C-k}.)@refill
765 805
766 A few commands treat a plain @kbd{C-u} differently from an ordinary 806 A few commands treat a plain @kbd{C-u} differently from an ordinary
767 argument. A few others may treat an argument of just a minus sign 807 argument. A few others may treat an argument of just a minus sign
768 differently from an argument of @minus{}1. These unusual cases are 808 differently from an argument of @minus{}1. These unusual cases are
769 described when they come up; they are always for reasons of convenience 809 described when they come up; they are always for reasons of
770 of use of the individual command. 810 convenience of use of the individual command, and they are documented
811 in the command's documentation string.
771 812
772 You can use a numeric argument to insert multiple copies of a 813 You can use a numeric argument to insert multiple copies of a
773 character. This is straightforward unless the character is a digit; for 814 character. This is straightforward unless the character is a digit; for
774 example, @kbd{C-u 6 4 a} inserts 64 copies of the character @samp{a}. 815 example, @kbd{C-u 6 4 a} inserts 64 copies of the character @samp{a}.
775 But this does not work for inserting digits; @kbd{C-u 6 4 1} specifies 816 But this does not work for inserting digits; @kbd{C-u 6 4 1} specifies
808 characters. You can repeat that command (including its argument) three 849 characters. You can repeat that command (including its argument) three
809 additional times, to delete a total of 80 characters, by typing @kbd{C-x 850 additional times, to delete a total of 80 characters, by typing @kbd{C-x
810 z z z}. The first @kbd{C-x z} repeats the command once, and each 851 z z z}. The first @kbd{C-x z} repeats the command once, and each
811 subsequent @kbd{z} repeats it once again. 852 subsequent @kbd{z} repeats it once again.
812 853
854 @ignore
855 arch-tag: cda8952a-c439-41c1-aecf-4bc0d6482956
856 @end ignore