diff options
| author | Richard M. Stallman | 2006-01-31 18:37:23 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-01-31 18:37:23 +0000 |
| commit | 54952612bb664d051e80143bc97daf698f4fce7e (patch) | |
| tree | cbbe260353fbaf619b9521fbd531904b630985c2 | |
| parent | 5c5245f71f8699278cd7582ceb2d15a216e17466 (diff) | |
| download | emacs-54952612bb664d051e80143bc97daf698f4fce7e.tar.gz emacs-54952612bb664d051e80143bc97daf698f4fce7e.zip | |
Minor clarifications.
(Display): Rearrange menu.
(Standard Faces): Mention query-replace face.
(Faces): Simplify.
(Font Lock): Simplify face customization info.
(Highlight Changes): Node merged into Highlight Interactively.
(Highlight Interactively): Much rewriting and cleanup.
(Optional Mode Line): Narrowed line number not good for goto-line.
Simplify face customization advice.
(Text Display): Mention use of escape-glyph face.
Move ctl-arrow and tab-width here.
(Display Custom): Move no-redraw-on-reenter to end of node.
| -rw-r--r-- | man/display.texi | 362 |
1 files changed, 169 insertions, 193 deletions
diff --git a/man/display.texi b/man/display.texi index 233a3f62021..9fee37afdc1 100644 --- a/man/display.texi +++ b/man/display.texi | |||
| @@ -11,16 +11,15 @@ allow you to specify which part of the text you want to see, and how to | |||
| 11 | display it. | 11 | display it. |
| 12 | 12 | ||
| 13 | @menu | 13 | @menu |
| 14 | * Scrolling:: Moving text up and down in a window. | ||
| 15 | * Horizontal Scrolling:: Moving text left and right in a window. | ||
| 16 | * Follow Mode:: Follow mode lets two windows scroll as one. | ||
| 14 | * Faces:: How to change the display style using faces. | 17 | * Faces:: How to change the display style using faces. |
| 15 | * Standard Faces:: Emacs' predefined faces. | 18 | * Standard Faces:: Emacs' predefined faces. |
| 16 | * Font Lock:: Minor mode for syntactic highlighting using faces. | 19 | * Font Lock:: Minor mode for syntactic highlighting using faces. |
| 17 | * Highlight Interactively:: Tell Emacs what text to highlight. | 20 | * Highlight Interactively:: Tell Emacs what text to highlight. |
| 18 | * Highlight Changes:: Using colors to show where you changed the buffer. | ||
| 19 | * Scrolling:: Moving text up and down in a window. | ||
| 20 | * Horizontal Scrolling:: Moving text left and right in a window. | ||
| 21 | * Fringes:: Enabling or disabling window fringes. | 21 | * Fringes:: Enabling or disabling window fringes. |
| 22 | * Useless Whitespace:: Showing possibly-spurious trailing whitespace. | 22 | * Useless Whitespace:: Showing possibly-spurious trailing whitespace. |
| 23 | * Follow Mode:: Follow mode lets two windows scroll as one. | ||
| 24 | * Selective Display:: Hiding lines with lots of indentation. | 23 | * Selective Display:: Hiding lines with lots of indentation. |
| 25 | * Optional Mode Line:: Optional mode line display features. | 24 | * Optional Mode Line:: Optional mode line display features. |
| 26 | * Text Display:: How text characters are normally displayed. | 25 | * Text Display:: How text characters are normally displayed. |
| @@ -39,26 +38,18 @@ characters, the foreground and background color, and underlining or | |||
| 39 | overlining. A face does not have to specify all of these attributes; | 38 | overlining. A face does not have to specify all of these attributes; |
| 40 | often it inherits most of them from another face. | 39 | often it inherits most of them from another face. |
| 41 | 40 | ||
| 42 | On a window system, all the Emacs face attributes are meaningful. | 41 | On graphical display, all the Emacs face attributes are meaningful. |
| 43 | On a character terminal, only some of them work. Some character | 42 | On a text-only terminal, only some of them work. Some text-only |
| 44 | terminals support inverse video, bold, and underline attributes; some | 43 | terminals support inverse video, bold, and underline attributes; some |
| 45 | support colors. Character terminals generally do not support changing | 44 | support colors. Text-only terminals generally do not support changing |
| 46 | the height and width or the font family. | 45 | the height and width or the font family. |
| 47 | 46 | ||
| 48 | The easiest way to use faces is to turn on Font Lock mode. | 47 | Emacs uses faces automatically for highlighting, through the work of |
| 49 | @xref{Font Lock}, for more information about Font Lock mode and | 48 | Font Lock mode. @xref{Font Lock}, for more information about Font |
| 50 | syntactic highlighting. You can print out the buffer with the | 49 | Lock mode and syntactic highlighting. You can print out the buffer |
| 51 | highlighting that appears on your screen using the command | 50 | with the highlighting that appears on your screen using the command |
| 52 | @code{ps-print-buffer-with-faces}. @xref{PostScript}. | 51 | @code{ps-print-buffer-with-faces}. @xref{PostScript}. |
| 53 | 52 | ||
| 54 | Features which rely on text in multiple faces (such as Font Lock mode) | ||
| 55 | will also work on non-windowed terminals that can display more than one | ||
| 56 | face, whether by colors or underlining and emboldening. This includes | ||
| 57 | the console on GNU/Linux, an @code{xterm} which supports colors, the | ||
| 58 | MS-DOS display (@pxref{MS-DOS}), and the MS-Windows version invoked with | ||
| 59 | the @option{-nw} option. Emacs determines automatically whether the | ||
| 60 | terminal has this capability. | ||
| 61 | |||
| 62 | You control the appearance of a part of the text in the buffer by | 53 | You control the appearance of a part of the text in the buffer by |
| 63 | specifying the face or faces to use for it. The style of display used | 54 | specifying the face or faces to use for it. The style of display used |
| 64 | for any given character is determined by combining the attributes of | 55 | for any given character is determined by combining the attributes of |
| @@ -106,12 +97,12 @@ type @kbd{M-x list-faces-display}. It's possible for a given face to | |||
| 106 | look different in different frames; this command shows the appearance | 97 | look different in different frames; this command shows the appearance |
| 107 | in the frame in which you type it. | 98 | in the frame in which you type it. |
| 108 | 99 | ||
| 109 | Here are the standard faces for specifying text appearance. You can | 100 | Here are the standard faces for specifying text appearance. You can |
| 110 | use them on specific text, when you want the effects they produce. | 101 | apply them to specific text when you want the effects they produce. |
| 111 | 102 | ||
| 112 | @table @code | 103 | @table @code |
| 113 | @item default | 104 | @item default |
| 114 | This face is used for ordinary text that doesn't specify any other face. | 105 | This face is used for ordinary text that doesn't specify any face. |
| 115 | @item bold | 106 | @item bold |
| 116 | This face uses a bold variant of the default font, if it has one. | 107 | This face uses a bold variant of the default font, if it has one. |
| 117 | It's up to you to choose a default font that has a bold variant, | 108 | It's up to you to choose a default font that has a bold variant, |
| @@ -126,7 +117,7 @@ This face underlines text. | |||
| 126 | This face forces use of a particular fixed-width font. | 117 | This face forces use of a particular fixed-width font. |
| 127 | @item variable-pitch | 118 | @item variable-pitch |
| 128 | This face forces use of a particular variable-width font. It's | 119 | This face forces use of a particular variable-width font. It's |
| 129 | reasonable to customize this to use a different variable-width font, | 120 | reasonable to customize this face to use a different variable-width font, |
| 130 | if you like, but you should not make it a fixed-width font. | 121 | if you like, but you should not make it a fixed-width font. |
| 131 | @item shadow | 122 | @item shadow |
| 132 | This face is used for making the text less noticeable than the surrounding | 123 | This face is used for making the text less noticeable than the surrounding |
| @@ -143,7 +134,9 @@ their own faces for this purpose.) | |||
| 143 | This face is used for highlighting portions of text, in various modes. | 134 | This face is used for highlighting portions of text, in various modes. |
| 144 | For example, mouse-sensitive text is highlighted using this face. | 135 | For example, mouse-sensitive text is highlighted using this face. |
| 145 | @item isearch | 136 | @item isearch |
| 146 | This face is used for highlighting Isearch matches. | 137 | This face is used for highlighting the current Isearch match. |
| 138 | @item query-replace | ||
| 139 | This face is used for highlighting the current Query Replace match. | ||
| 147 | @item lazy-highlight | 140 | @item lazy-highlight |
| 148 | This face is used for lazy highlighting of Isearch and Query Replace | 141 | This face is used for lazy highlighting of Isearch and Query Replace |
| 149 | matches other than the current one. | 142 | matches other than the current one. |
| @@ -182,7 +175,7 @@ appearance of these parts of the frame. | |||
| 182 | @itemx modeline | 175 | @itemx modeline |
| 183 | This face is used for the mode line of the currently selected window, | 176 | This face is used for the mode line of the currently selected window, |
| 184 | and for menu bars when toolkit menus are not used. By default, it's | 177 | and for menu bars when toolkit menus are not used. By default, it's |
| 185 | drawn with shadows for a ``raised'' effect on window systems, and | 178 | drawn with shadows for a ``raised'' effect on graphical displays, and |
| 186 | drawn as the inverse of the default face on non-windowed terminals. | 179 | drawn as the inverse of the default face on non-windowed terminals. |
| 187 | @code{modeline} is an alias for the @code{mode-line} face, for | 180 | @code{modeline} is an alias for the @code{mode-line} face, for |
| 188 | compatibility with old Emacs versions. | 181 | compatibility with old Emacs versions. |
| @@ -196,12 +189,14 @@ Like @code{highlight}, but used for portions of text on mode lines. | |||
| 196 | @item mode-line-buffer-id | 189 | @item mode-line-buffer-id |
| 197 | This face is used for buffer identification parts in the mode line. | 190 | This face is used for buffer identification parts in the mode line. |
| 198 | @item header-line | 191 | @item header-line |
| 199 | Similar to @code{mode-line} for a window's header line. Most modes | 192 | Similar to @code{mode-line} for a window's header line, which appears |
| 200 | don't use the header line, but some special modes, such the Info mode, do. | 193 | at the top of a window just as the mode line appears at the bottom. |
| 194 | Most windows do not have a header line---only some special modes, such | ||
| 195 | Info mode, create one. | ||
| 201 | @item vertical-border | 196 | @item vertical-border |
| 202 | This face is used for the vertical divider between windows. | 197 | This face is used for the vertical divider between windows. |
| 203 | By default this face inherits from the @code{mode-line-inactive} face | 198 | By default this face inherits from the @code{mode-line-inactive} face |
| 204 | on character terminals. On window systems the foreground color of | 199 | on character terminals. On graphical displays the foreground color of |
| 205 | this face is used for the vertical line between windows without | 200 | this face is used for the vertical line between windows without |
| 206 | scrollbars. | 201 | scrollbars. |
| 207 | @item minibuffer-prompt | 202 | @item minibuffer-prompt |
| @@ -227,8 +222,7 @@ This face determines the color of the cursor. | |||
| 227 | @item mouse | 222 | @item mouse |
| 228 | This face determines the color of the mouse pointer. | 223 | This face determines the color of the mouse pointer. |
| 229 | @item tool-bar | 224 | @item tool-bar |
| 230 | This is the basic tool-bar face. No text appears in the tool bar, but the | 225 | This face determines the color of tool bar icons. @xref{Tool Bars}. |
| 231 | colors of this face affect the appearance of tool bar icons. @xref{Tool Bars}. | ||
| 232 | @item tooltip | 226 | @item tooltip |
| 233 | This face is used for tooltips. @xref{Tooltips}. | 227 | This face is used for tooltips. @xref{Tooltips}. |
| 234 | @item menu | 228 | @item menu |
| @@ -277,8 +271,8 @@ interface (@pxref{Easy Customization}), or use the function | |||
| 277 | @end example | 271 | @end example |
| 278 | 272 | ||
| 279 | @findex turn-on-font-lock | 273 | @findex turn-on-font-lock |
| 280 | If you have disabled Global Font Lock mode, you can still enable font | 274 | If you have disabled Global Font Lock mode, you can still enable Font |
| 281 | lock for specific major modes by adding the function | 275 | Lock for specific major modes by adding the function |
| 282 | @code{turn-on-font-lock} to the mode hooks (@pxref{Hooks}). For | 276 | @code{turn-on-font-lock} to the mode hooks (@pxref{Hooks}). For |
| 283 | example, to enable Font Lock mode for editing C files, you can do this: | 277 | example, to enable Font Lock mode for editing C files, you can do this: |
| 284 | 278 | ||
| @@ -288,24 +282,13 @@ example, to enable Font Lock mode for editing C files, you can do this: | |||
| 288 | 282 | ||
| 289 | Font Lock mode uses several specifically named faces to do its job, | 283 | Font Lock mode uses several specifically named faces to do its job, |
| 290 | including @code{font-lock-string-face}, @code{font-lock-comment-face}, | 284 | including @code{font-lock-string-face}, @code{font-lock-comment-face}, |
| 291 | and others. The easiest way to find them all is to use | 285 | and others. The easiest way to find them all is to use @kbd{M-x |
| 292 | @kbd{M-x customize-group @key{RET} font-lock-faces @key{RET}}. | 286 | customize-group @key{RET} font-lock-faces @key{RET}}. You can then |
| 293 | 287 | use that customization buffer to customize the appearance of these | |
| 294 | To change the colors or the fonts used by Font Lock mode to fontify | 288 | faces. @xref{Face Customization}. |
| 295 | different parts of text, just change these faces. There are | ||
| 296 | two ways to do it: | ||
| 297 | |||
| 298 | @itemize @bullet | ||
| 299 | @item | ||
| 300 | Invoke @kbd{M-x set-face-foreground} or @kbd{M-x set-face-background} | ||
| 301 | to change the colors of a particular face used by Font Lock. | ||
| 302 | @xref{Faces}. The command @kbd{M-x list-faces-display} displays all | ||
| 303 | the faces currently known to Emacs, including those used by Font Lock. | ||
| 304 | 289 | ||
| 305 | @item | 290 | You can also customize these faces using @kbd{M-x |
| 306 | Customize the faces interactively with @kbd{M-x customize-face}, as | 291 | set-face-foreground} or @kbd{M-x set-face-background}. @xref{Faces}. |
| 307 | described in @ref{Face Customization}. | ||
| 308 | @end itemize | ||
| 309 | 292 | ||
| 310 | @vindex font-lock-maximum-decoration | 293 | @vindex font-lock-maximum-decoration |
| 311 | The variable @code{font-lock-maximum-decoration} specifies the | 294 | The variable @code{font-lock-maximum-decoration} specifies the |
| @@ -324,8 +307,9 @@ otherwise, use this: | |||
| 324 | 307 | ||
| 325 | @vindex font-lock-maximum-size | 308 | @vindex font-lock-maximum-size |
| 326 | Fontification can be too slow for large buffers, so you can suppress | 309 | Fontification can be too slow for large buffers, so you can suppress |
| 327 | it. The variable @code{font-lock-maximum-size} specifies a buffer size, | 310 | it for buffers above a certain size. The variable |
| 328 | beyond which buffer fontification is suppressed. | 311 | @code{font-lock-maximum-size} specifies a buffer size, beyond which |
| 312 | buffer fontification is suppressed. | ||
| 329 | 313 | ||
| 330 | @c @w is used below to prevent a bad page-break. | 314 | @c @w is used below to prevent a bad page-break. |
| 331 | @vindex font-lock-beginning-of-syntax-function | 315 | @vindex font-lock-beginning-of-syntax-function |
| @@ -387,52 +371,62 @@ control this background fontification, also called @dfn{Just-In-Time} | |||
| 387 | group @samp{jit-lock}. @xref{Specific Customization}. | 371 | group @samp{jit-lock}. @xref{Specific Customization}. |
| 388 | 372 | ||
| 389 | @node Highlight Interactively | 373 | @node Highlight Interactively |
| 390 | @section Interactive Highlighting by Matching | 374 | @section Interactive Highlighting |
| 391 | @cindex highlighting by matching | 375 | @cindex highlighting by matching |
| 392 | @cindex interactive highlighting | 376 | @cindex interactive highlighting |
| 377 | @cindex Highlight Changes mode | ||
| 393 | 378 | ||
| 394 | It is sometimes useful to temporarily highlight text that | 379 | @findex highlight-changes-mode |
| 395 | matches a certain regular expression. For example, you might wish to | 380 | Use @kbd{M-x highlight-changes-mode} to enable (or disable) |
| 396 | see all the references to a certain variable in a program source file, | 381 | Highlight Changes mode, a minor mode that uses faces (colors, |
| 397 | highlight certain parts in a voluminous output of some program, or | 382 | typically) to indicate which parts of the buffer were changed most |
| 398 | make certain names stand out in an article. | 383 | recently. |
| 399 | 384 | ||
| 385 | @cindex Hi Lock mode | ||
| 400 | @findex hi-lock-mode | 386 | @findex hi-lock-mode |
| 401 | Use the @kbd{M-x hi-lock-mode} command to turn on a minor mode that | 387 | Hi Lock mode is another minor mode, which highlights text that |
| 402 | allows you to interactively add and remove regular expressions | 388 | matches your specified regular expressions. For example, you might |
| 403 | specifying text to be highlighted. Hi Lock mode works like Font Lock | 389 | wish to see all the references to a certain variable in a program |
| 404 | mode (@pxref{Font Lock}), except that it lets you easily add and | 390 | source file, highlight certain parts in a voluminous output of some |
| 405 | remove regular expressions while you are editing a buffer. To enable | 391 | program, or make certain names stand out in an article. Use the |
| 406 | Hi Lock mode for all buffers use @kbd{M-x global-hi-lock-mode} or | 392 | @kbd{M-x hi-lock-mode} command to enable (or disable) Hi Lock mode. |
| 407 | place @code{(global-hi-lock-mode 1)} in your @file{.emacs} file. | 393 | To enable Hi Lock mode for all buffers, use @kbd{M-x |
| 408 | 394 | global-hi-lock-mode} or place @code{(global-hi-lock-mode 1)} in your | |
| 409 | You control Hi Lock mode with these commands: | 395 | @file{.emacs} file. |
| 396 | |||
| 397 | Hi Lock mode works like Font Lock mode (@pxref{Font Lock}), except | ||
| 398 | that you specify explicitly the regular expressions to highlight. You | ||
| 399 | control them with these commands: | ||
| 410 | 400 | ||
| 411 | @table @kbd | 401 | @table @kbd |
| 412 | @item C-x w h @var{regexp} @key{RET} @var{face} @key{RET} | 402 | @item C-x w h @var{regexp} @key{RET} @var{face} @key{RET} |
| 413 | @kindex C-x w h | 403 | @kindex C-x w h |
| 414 | @findex highlight-regexp | 404 | @findex highlight-regexp |
| 415 | Highlight text that matches @var{regexp} using face @var{face} | 405 | Highlight text that matches @var{regexp} using face @var{face} |
| 416 | (@code{highlight-regexp}). By using this command more than once, you | 406 | (@code{highlight-regexp}). The highlighting will remain as long as |
| 417 | can highlight various parts of the text in different ways. The | 407 | the buffer is loaded. For example, to highlight all occurrences of |
| 418 | highlighting will remain as long as the buffer is loaded. For | 408 | the word ``whim'' using the default face (a yellow background) |
| 419 | example, to highlight all occurrences of the word ``whim'' using the | 409 | @kbd{C-x w h whim @key{RET} @key{RET}}. Any face can be used for |
| 420 | default face (a yellow background) @kbd{C-x w h whim @key{RET} | 410 | highlighting, Hi Lock provides several of its own and these are |
| 421 | @key{RET}}. Any face can be used for highlighting, Hi Lock provides | 411 | pre-loaded into a history list. While being prompted for a face use |
| 422 | several of its own and these are pre-loaded into a history list. While | 412 | @kbd{M-p} and @kbd{M-n} to cycle through them. |
| 423 | being prompted for a face use @kbd{M-p} and @kbd{M-n} to cycle through | 413 | |
| 424 | them. | 414 | You can use this command multiple times, specifying various regular |
| 415 | expressions to highlight in different ways. | ||
| 425 | 416 | ||
| 426 | @item C-x w r @var{regexp} @key{RET} | 417 | @item C-x w r @var{regexp} @key{RET} |
| 427 | @kindex C-x w r | 418 | @kindex C-x w r |
| 428 | @findex unhighlight-regexp | 419 | @findex unhighlight-regexp |
| 429 | Unhighlight @var{regexp} (@code{unhighlight-regexp}). | 420 | Unhighlight @var{regexp} (@code{unhighlight-regexp}). |
| 430 | When activated from the menu select the expression to unhighlight from | 421 | |
| 431 | a list. When activated from the keyboard the most recently added | 422 | If you invoke this from the menu, you select the expression to |
| 432 | expression will be shown. Use @kbd{M-p} to show the next older | 423 | unhighlight from a list. If you invoke this from the keyboard, you |
| 433 | expression and @kbd{M-n} to select the next newer expression. When | 424 | use the minibuffer. It will show the most recently added regular |
| 434 | the expression to unhighlight appears press @kbd{@key{RET}} to unhighlight | 425 | expression; use @kbd{M-p} to show the next older expression and |
| 435 | it. The expression can also be typed and completion is available. | 426 | @kbd{M-n} to select the next newer expression. (You can also type the |
| 427 | expression by hand, with completion.) When the expression you want to | ||
| 428 | unhighlight appears in the minibuffer, press @kbd{@key{RET}} to exit | ||
| 429 | the minibuffer and unhighlight it. | ||
| 436 | 430 | ||
| 437 | @item C-x w l @var{regexp} @key{RET} @var{face} @key{RET} | 431 | @item C-x w l @var{regexp} @key{RET} @var{face} @key{RET} |
| 438 | @kindex C-x w l | 432 | @kindex C-x w l |
| @@ -447,8 +441,8 @@ Highlight entire lines containing a match for @var{regexp}, using face | |||
| 447 | @findex hi-lock-write-interactive-patterns | 441 | @findex hi-lock-write-interactive-patterns |
| 448 | Insert all the current highlighting regexp/face pairs into the buffer | 442 | Insert all the current highlighting regexp/face pairs into the buffer |
| 449 | at point, with comment delimiters to prevent them from changing your | 443 | at point, with comment delimiters to prevent them from changing your |
| 450 | program. This key binding runs the | 444 | program. (This key binding runs the |
| 451 | @code{hi-lock-write-interactive-patterns} command. | 445 | @code{hi-lock-write-interactive-patterns} command.) |
| 452 | 446 | ||
| 453 | These patterns will be read the next time you visit the file while | 447 | These patterns will be read the next time you visit the file while |
| 454 | Hi Lock mode is enabled, or whenever you use the @kbd{M-x | 448 | Hi Lock mode is enabled, or whenever you use the @kbd{M-x |
| @@ -472,14 +466,6 @@ This command does nothing if the major mode is a member of the list | |||
| 472 | @code{hi-lock-exclude-modes}. | 466 | @code{hi-lock-exclude-modes}. |
| 473 | @end table | 467 | @end table |
| 474 | 468 | ||
| 475 | @node Highlight Changes | ||
| 476 | @section Highlight Changes Mode | ||
| 477 | |||
| 478 | @findex highlight-changes-mode | ||
| 479 | Use @kbd{M-x highlight-changes-mode} to enable a minor mode | ||
| 480 | that uses faces (colors, typically) to indicate which parts of | ||
| 481 | the buffer were changed most recently. | ||
| 482 | |||
| 483 | @node Scrolling | 469 | @node Scrolling |
| 484 | @section Scrolling | 470 | @section Scrolling |
| 485 | 471 | ||
| @@ -489,12 +475,13 @@ the text. The portion shown always contains point. | |||
| 489 | 475 | ||
| 490 | @cindex scrolling | 476 | @cindex scrolling |
| 491 | @dfn{Scrolling} means moving text up or down in the window so that | 477 | @dfn{Scrolling} means moving text up or down in the window so that |
| 492 | different parts of the text are visible. Scrolling forward means that text | 478 | different parts of the text are visible. Scrolling ``forward'' or |
| 493 | moves up, and new text appears at the bottom. Scrolling backward moves | 479 | ``up'' means that text moves up, and new text appears at the bottom. |
| 494 | text down and new text appears at the top. | 480 | Scrolling ``backward'' or ``down'' moves text down, and new text |
| 481 | appears at the top. | ||
| 495 | 482 | ||
| 496 | Scrolling happens automatically if you move point past the bottom or top | 483 | Scrolling happens automatically if you move point past the bottom or |
| 497 | of the window. You can also explicitly request scrolling with the commands | 484 | top of the window. You can also scroll explicitly with the commands |
| 498 | in this section. | 485 | in this section. |
| 499 | 486 | ||
| 500 | @table @kbd | 487 | @table @kbd |
| @@ -733,7 +720,9 @@ for the selected frame, use @kbd{M-x set-fringe-style}. | |||
| 733 | It is easy to leave unnecessary spaces at the end of a line, or | 720 | It is easy to leave unnecessary spaces at the end of a line, or |
| 734 | empty lines at the end of a file, without realizing it. In most | 721 | empty lines at the end of a file, without realizing it. In most |
| 735 | cases, this @dfn{trailing whitespace} has no effect, but there are | 722 | cases, this @dfn{trailing whitespace} has no effect, but there are |
| 736 | special circumstances where it matters. | 723 | special circumstances where it matters. It can also be a nuisance |
| 724 | that the line has ``changed,'' when the change is just spaces added or | ||
| 725 | removed at the end. | ||
| 737 | 726 | ||
| 738 | You can make trailing whitespace at the end of a line visible on the | 727 | You can make trailing whitespace at the end of a line visible on the |
| 739 | screen by setting the buffer-local variable | 728 | screen by setting the buffer-local variable |
| @@ -768,7 +757,7 @@ this image in the fringe. | |||
| 768 | value of this variable is controlled by the variable | 757 | value of this variable is controlled by the variable |
| 769 | @code{default-indicate-empty-lines}; by setting that variable, you | 758 | @code{default-indicate-empty-lines}; by setting that variable, you |
| 770 | can enable or disable this feature for all new buffers. (This feature | 759 | can enable or disable this feature for all new buffers. (This feature |
| 771 | currently doesn't work on character terminals.) | 760 | currently doesn't work on text-only terminals.) |
| 772 | 761 | ||
| 773 | @node Follow Mode | 762 | @node Follow Mode |
| 774 | @section Follow Mode | 763 | @section Follow Mode |
| @@ -868,6 +857,9 @@ minor modes and about how to use this command. | |||
| 868 | @cindex narrowing, and line number display | 857 | @cindex narrowing, and line number display |
| 869 | If you have narrowed the buffer (@pxref{Narrowing}), the displayed | 858 | If you have narrowed the buffer (@pxref{Narrowing}), the displayed |
| 870 | line number is relative to the accessible portion of the buffer. | 859 | line number is relative to the accessible portion of the buffer. |
| 860 | Thus, it isn't suitable as an argument to @code{goto-line}. (Use | ||
| 861 | @code{what-line} command to see the line number relative to the whole | ||
| 862 | file.) | ||
| 871 | 863 | ||
| 872 | @vindex line-number-display-limit | 864 | @vindex line-number-display-limit |
| 873 | If the buffer is very large (larger than the value of | 865 | If the buffer is very large (larger than the value of |
| @@ -933,19 +925,7 @@ file in the directory is considered as ``newly arrived mail''). | |||
| 933 | 3D-style highlighting, like that of a button when it is not being | 925 | 3D-style highlighting, like that of a button when it is not being |
| 934 | pressed. If you don't like this effect, you can disable the 3D | 926 | pressed. If you don't like this effect, you can disable the 3D |
| 935 | highlighting of the mode line, by customizing the attributes of the | 927 | highlighting of the mode line, by customizing the attributes of the |
| 936 | @code{mode-line} face in your @file{.emacs} init file, like this: | 928 | @code{mode-line} face. @xref{Face Customization}. |
| 937 | |||
| 938 | @example | ||
| 939 | (set-face-attribute 'mode-line nil :box nil) | ||
| 940 | @end example | ||
| 941 | |||
| 942 | @noindent | ||
| 943 | Alternatively, you can turn off the box attribute in your | ||
| 944 | @file{.Xdefaults} file: | ||
| 945 | |||
| 946 | @example | ||
| 947 | Emacs.mode-line.AttributeBox: off | ||
| 948 | @end example | ||
| 949 | 929 | ||
| 950 | @cindex non-selected windows, mode line appearance | 930 | @cindex non-selected windows, mode line appearance |
| 951 | By default, the mode line of nonselected windows is displayed in a | 931 | By default, the mode line of nonselected windows is displayed in a |
| @@ -968,8 +948,7 @@ lines are displayed in the @code{mode-line} face. | |||
| 968 | You can customize the mode line display for each of the end-of-line | 948 | You can customize the mode line display for each of the end-of-line |
| 969 | formats by setting each of the variables @code{eol-mnemonic-unix}, | 949 | formats by setting each of the variables @code{eol-mnemonic-unix}, |
| 970 | @code{eol-mnemonic-dos}, @code{eol-mnemonic-mac}, and | 950 | @code{eol-mnemonic-dos}, @code{eol-mnemonic-mac}, and |
| 971 | @code{eol-mnemonic-undecided} to any string you find appropriate. | 951 | @code{eol-mnemonic-undecided} to the strings you prefer. |
| 972 | @xref{Variables}, for an explanation of how to set variables. | ||
| 973 | 952 | ||
| 974 | @node Text Display | 953 | @node Text Display |
| 975 | @section How Text Is Displayed | 954 | @section How Text Is Displayed |
| @@ -986,17 +965,27 @@ tab stop column (normally every 8 columns). | |||
| 986 | 965 | ||
| 987 | Other @acronym{ASCII} control characters are normally displayed as a caret | 966 | Other @acronym{ASCII} control characters are normally displayed as a caret |
| 988 | (@samp{^}) followed by the non-control version of the character; thus, | 967 | (@samp{^}) followed by the non-control version of the character; thus, |
| 989 | control-A is displayed as @samp{^A}. | 968 | control-A is displayed as @samp{^A}. The caret appears in face |
| 990 | 969 | @code{escape-glyph}. | |
| 991 | Non-@acronym{ASCII} characters 0200 through 0237 (octal) are displayed with | 970 | |
| 992 | octal escape sequences; thus, character code 0230 (octal) is displayed | 971 | Non-@acronym{ASCII} characters 0200 through 0237 (octal) are |
| 993 | as @samp{\230}. The display of character codes 0240 through 0377 | 972 | displayed with octal escape sequences; thus, character code 0230 |
| 994 | (octal) may be either as escape sequences or as graphics. They do not | 973 | (octal) is displayed as @samp{\230}. The backslash appears in face |
| 995 | normally occur in multibyte buffers, but if they do, they are displayed | 974 | @code{escape-glyph}. |
| 996 | as Latin-1 graphics. In unibyte mode, if you enable European display | 975 | |
| 997 | they are displayed using their graphics (assuming your terminal supports | 976 | @vindex ctl-arrow |
| 998 | them), otherwise as escape sequences. @xref{Single-Byte Character | 977 | If the variable @code{ctl-arrow} is @code{nil}, control characters in |
| 999 | Support}. | 978 | the buffer are displayed with octal escape sequences, except for newline |
| 979 | and tab. Altering the value of @code{ctl-arrow} makes it local to the | ||
| 980 | current buffer; until that time, the default value is in effect. The | ||
| 981 | default is initially @code{t}. | ||
| 982 | |||
| 983 | The display of character codes 0240 through 0377 (octal) may be | ||
| 984 | either as escape sequences or as graphics. They do not normally occur | ||
| 985 | in multibyte buffers, but if they do, they are displayed as Latin-1 | ||
| 986 | graphics. In unibyte mode, if you enable European display they are | ||
| 987 | displayed using their graphics (assuming your terminal supports them), | ||
| 988 | otherwise as escape sequences. @xref{Single-Byte Character Support}. | ||
| 1000 | 989 | ||
| 1001 | @vindex nobreak-char-display | 990 | @vindex nobreak-char-display |
| 1002 | @cindex no-break space, display | 991 | @cindex no-break space, display |
| @@ -1011,6 +1000,23 @@ this feature by setting the variable @code{nobreak-char-display} to | |||
| 1011 | @code{nil}. If you set the variable to any other value, that means to | 1000 | @code{nil}. If you set the variable to any other value, that means to |
| 1012 | prefix these characters with an escape character. | 1001 | prefix these characters with an escape character. |
| 1013 | 1002 | ||
| 1003 | @vindex tab-width | ||
| 1004 | @vindex default-tab-width | ||
| 1005 | Normally, a tab character in the buffer is displayed as whitespace which | ||
| 1006 | extends to the next display tab stop position, and display tab stops come | ||
| 1007 | at intervals equal to eight spaces. The number of spaces per tab is | ||
| 1008 | controlled by the variable @code{tab-width}, which is made local by | ||
| 1009 | changing it. Note that how the tab character | ||
| 1010 | in the buffer is displayed has nothing to do with the definition of | ||
| 1011 | @key{TAB} as a command. The variable @code{tab-width} must have an | ||
| 1012 | integer value between 1 and 1000, inclusive. The variable | ||
| 1013 | @code{default-tab-width} controls the default value of this variable | ||
| 1014 | for buffers where you have not set it locally. | ||
| 1015 | |||
| 1016 | You can customize the way any particular character code is displayed | ||
| 1017 | by means of a display table. @xref{Display Tables,, Display Tables, | ||
| 1018 | elisp, The Emacs Lisp Reference Manual}. | ||
| 1019 | |||
| 1014 | @node Cursor Display | 1020 | @node Cursor Display |
| 1015 | @section Displaying the Cursor | 1021 | @section Displaying the Cursor |
| 1016 | 1022 | ||
| @@ -1053,8 +1059,8 @@ tab character. To enable this feature, set the variable | |||
| 1053 | @findex hl-line-mode | 1059 | @findex hl-line-mode |
| 1054 | @findex global-hl-line-mode | 1060 | @findex global-hl-line-mode |
| 1055 | @cindex highlight current line | 1061 | @cindex highlight current line |
| 1056 | If you find it hard to see the cursor, you might like HL Line mode, | 1062 | To make the cursor even more visible, you can use HL Line mode, a |
| 1057 | a minor mode that highlights the line containing point. Use @kbd{M-x | 1063 | minor mode that highlights the line containing point. Use @kbd{M-x |
| 1058 | hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x | 1064 | hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x |
| 1059 | global-hl-line-mode} enables or disables the same mode globally. | 1065 | global-hl-line-mode} enables or disables the same mode globally. |
| 1060 | 1066 | ||
| @@ -1062,7 +1068,7 @@ global-hl-line-mode} enables or disables the same mode globally. | |||
| 1062 | @section Customization of Display | 1068 | @section Customization of Display |
| 1063 | 1069 | ||
| 1064 | This section describes variables (@pxref{Variables}) that you can | 1070 | This section describes variables (@pxref{Variables}) that you can |
| 1065 | change to customize how Emacs displays text. Beginning users can skip | 1071 | change to customize how Emacs displays. Beginning users can skip |
| 1066 | it. | 1072 | it. |
| 1067 | @c the reason for that pxref is because an xref early in the | 1073 | @c the reason for that pxref is because an xref early in the |
| 1068 | @c ``echo area'' section leads here. | 1074 | @c ``echo area'' section leads here. |
| @@ -1077,51 +1083,18 @@ to make the whole screen blink when it would normally make an audible bell | |||
| 1077 | sound. This variable has no effect if your terminal does not have a way | 1083 | sound. This variable has no effect if your terminal does not have a way |
| 1078 | to make the screen blink. | 1084 | to make the screen blink. |
| 1079 | 1085 | ||
| 1080 | @vindex no-redraw-on-reenter | ||
| 1081 | On a text terminal, when you reenter Emacs after suspending, Emacs | ||
| 1082 | normally clears the screen and redraws the entire display. On some | ||
| 1083 | terminals with more than one page of memory, it is possible to arrange | ||
| 1084 | the termcap entry so that the @samp{ti} and @samp{te} strings (output | ||
| 1085 | to the terminal when Emacs is entered and exited, respectively) switch | ||
| 1086 | between pages of memory so as to use one page for Emacs and another | ||
| 1087 | page for other output. Then you might want to set the variable | ||
| 1088 | @code{no-redraw-on-reenter} non-@code{nil}; this tells Emacs to | ||
| 1089 | assume, when resumed, that the screen page it is using still contains | ||
| 1090 | what Emacs last wrote there. | ||
| 1091 | |||
| 1092 | @vindex echo-keystrokes | 1086 | @vindex echo-keystrokes |
| 1093 | The variable @code{echo-keystrokes} controls the echoing of multi-character | 1087 | The variable @code{echo-keystrokes} controls the echoing of multi-character |
| 1094 | keys; its value is the number of seconds of pause required to cause echoing | 1088 | keys; its value is the number of seconds of pause required to cause echoing |
| 1095 | to start, or zero meaning don't echo at all. @xref{Echo Area}. | 1089 | to start, or zero, meaning don't echo at all. @xref{Echo Area}. |
| 1096 | |||
| 1097 | @vindex ctl-arrow | ||
| 1098 | If the variable @code{ctl-arrow} is @code{nil}, all control characters in | ||
| 1099 | the buffer are displayed with octal escape sequences, except for newline | ||
| 1100 | and tab. Altering the value of @code{ctl-arrow} makes it local to the | ||
| 1101 | current buffer; until that time, the default value is in effect. The | ||
| 1102 | default is initially @code{t}. @xref{Display Tables,, Display Tables, | ||
| 1103 | elisp, The Emacs Lisp Reference Manual}. | ||
| 1104 | |||
| 1105 | @vindex tab-width | ||
| 1106 | @vindex default-tab-width | ||
| 1107 | Normally, a tab character in the buffer is displayed as whitespace which | ||
| 1108 | extends to the next display tab stop position, and display tab stops come | ||
| 1109 | at intervals equal to eight spaces. The number of spaces per tab is | ||
| 1110 | controlled by the variable @code{tab-width}, which is made local by | ||
| 1111 | changing it, just like @code{ctl-arrow}. Note that how the tab character | ||
| 1112 | in the buffer is displayed has nothing to do with the definition of | ||
| 1113 | @key{TAB} as a command. The variable @code{tab-width} must have an | ||
| 1114 | integer value between 1 and 1000, inclusive. The variable | ||
| 1115 | @code{default-tab-width} controls the default value of this variable | ||
| 1116 | for buffers where you have not set it locally. | ||
| 1117 | 1090 | ||
| 1118 | @cindex truncation | 1091 | @cindex truncation |
| 1119 | @cindex line truncation, and fringes | 1092 | @cindex line truncation, and fringes |
| 1120 | As an alternative to continuation, Emacs can display long lines by | 1093 | As an alternative to continuation, Emacs can display long lines by |
| 1121 | @dfn{truncation}. This means that all the characters that do not fit | 1094 | @dfn{truncation}. This means that all the characters that do not fit |
| 1122 | in the width of the screen or window do not appear at all. On | 1095 | in the width of the screen or window do not appear at all. On |
| 1123 | graphical terminals, a small straight arrow in the fringe indicates | 1096 | graphical displays, a small straight arrow in the fringe indicates |
| 1124 | truncation at either end of the line. On text terminals, @samp{$} | 1097 | truncation at either end of the line. On text-only terminals, @samp{$} |
| 1125 | appears in the first column when there is text truncated to the left, | 1098 | appears in the first column when there is text truncated to the left, |
| 1126 | and in the last column when there is text truncated to the right. | 1099 | and in the last column when there is text truncated to the right. |
| 1127 | 1100 | ||
| @@ -1147,27 +1120,22 @@ elisp, The Emacs Lisp Reference Manual}. | |||
| 1147 | 1120 | ||
| 1148 | @vindex overflow-newline-into-fringe | 1121 | @vindex overflow-newline-into-fringe |
| 1149 | If the variable @code{overflow-newline-into-fringe} is | 1122 | If the variable @code{overflow-newline-into-fringe} is |
| 1150 | non-@code{nil} on a window system, it specifies that lines which are | 1123 | non-@code{nil} on a graphical display, then Emacs does not continue or |
| 1151 | exactly as wide as the window (not counting the final newline | 1124 | truncate a line which is exactly as wide as the window. Instead, the |
| 1152 | character) shall not be broken into two lines on the display (with | 1125 | newline overflows into the right fringe, and the cursor appears in the |
| 1153 | just the newline on the second line). Instead, the newline | 1126 | fringe when positioned on that newline. |
| 1154 | overflows into the right fringe, and the cursor will be displayed in | ||
| 1155 | the fringe when positioned on that newline. | ||
| 1156 | 1127 | ||
| 1157 | @vindex indicate-buffer-boundaries | 1128 | @vindex indicate-buffer-boundaries |
| 1158 | On a window system, Emacs may indicate the buffer boundaries in the | 1129 | On a graphical display, Emacs can indicate the buffer boundaries in |
| 1159 | fringes. The buffer boundaries, i.e. first and last line in the | 1130 | the fringes. It inddicates the first line and the last line with |
| 1160 | buffer, can be marked with angle bitmaps in the left or right fringe. | 1131 | angle images in the fringes. This can be combined with up and down |
| 1161 | This can be combined with up and down arrow bitmaps shown at the top | 1132 | arrow images which say whether it is possible to scroll the window up |
| 1162 | and bottom of the left or right fringe if the window can be scrolled | 1133 | and down. |
| 1163 | in either direction. | ||
| 1164 | 1134 | ||
| 1165 | The buffer-local variable @code{indicate-buffer-boundaries} controls | 1135 | The buffer-local variable @code{indicate-buffer-boundaries} controls |
| 1166 | how the buffer boundaries and window scrolling is indicated in the | 1136 | how the buffer boundaries and window scrolling is indicated in the |
| 1167 | fringes. | 1137 | fringes. If the value is @code{left} or @code{right}, both angle and |
| 1168 | 1138 | arrow bitmaps are displayed in the left or right fringe, respectively. | |
| 1169 | If the value is @code{left} or @code{right}, both angle and arrow | ||
| 1170 | bitmaps are displayed in the left or right fringe, respectively. | ||
| 1171 | 1139 | ||
| 1172 | If value is an alist, each element @code{(@var{indicator} . | 1140 | If value is an alist, each element @code{(@var{indicator} . |
| 1173 | @var{position})} specifies the position of one of the indicators. | 1141 | @var{position})} specifies the position of one of the indicators. |
| @@ -1189,25 +1157,21 @@ is the default value for @code{indicate-buffer-boundaries} in buffers | |||
| 1189 | that do not override it. | 1157 | that do not override it. |
| 1190 | 1158 | ||
| 1191 | @vindex baud-rate | 1159 | @vindex baud-rate |
| 1192 | The variable @anchor{baud-rate}@code{baud-rate} holds the output speed of the | 1160 | The variable @anchor{baud-rate}@code{baud-rate} holds the output |
| 1193 | terminal, as far as Emacs knows. Setting this variable does not | 1161 | speed of the terminal, as far as Emacs knows. Setting this variable |
| 1194 | change the speed of actual data transmission, but the value is used | 1162 | does not change the speed of actual data transmission, but the value |
| 1195 | for calculations. On terminals, it affects padding, and decisions | 1163 | is used for calculations. On text-only terminals, it affects padding, |
| 1196 | about whether to scroll part of the screen or redraw it instead. | 1164 | and decisions about whether to scroll part of the screen or redraw it |
| 1197 | It also affects the behavior of incremental search. | 1165 | instead. It also affects the behavior of incremental search. |
| 1198 | 1166 | ||
| 1199 | On window-systems, @code{baud-rate} is only used to determine how | 1167 | On graphical displays, @code{baud-rate} is only used to determine |
| 1200 | frequently to look for pending input during display updating. A | 1168 | how frequently to look for pending input during display updating. A |
| 1201 | higher value of @code{baud-rate} means that check for pending input | 1169 | higher value of @code{baud-rate} means that check for pending input |
| 1202 | will be done less frequently. | 1170 | will be done less frequently. |
| 1203 | 1171 | ||
| 1204 | You can customize the way any particular character code is displayed | ||
| 1205 | by means of a display table. @xref{Display Tables,, Display Tables, | ||
| 1206 | elisp, The Emacs Lisp Reference Manual}. | ||
| 1207 | |||
| 1208 | @cindex hourglass pointer display | 1172 | @cindex hourglass pointer display |
| 1209 | @vindex hourglass-delay | 1173 | @vindex hourglass-delay |
| 1210 | On a window system, Emacs can optionally display the mouse pointer | 1174 | On graphical display, Emacs can optionally display the mouse pointer |
| 1211 | in a special shape to say that Emacs is busy. To turn this feature on | 1175 | in a special shape to say that Emacs is busy. To turn this feature on |
| 1212 | or off, customize the group @code{cursor}. You can also control the | 1176 | or off, customize the group @code{cursor}. You can also control the |
| 1213 | amount of time Emacs must remain busy before the busy indicator is | 1177 | amount of time Emacs must remain busy before the busy indicator is |
| @@ -1219,6 +1183,18 @@ result in text that is hard to read. Call the function | |||
| 1219 | @code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} | 1183 | @code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} |
| 1220 | argument to suppress the effect of bold-face in this case. | 1184 | argument to suppress the effect of bold-face in this case. |
| 1221 | 1185 | ||
| 1186 | @vindex no-redraw-on-reenter | ||
| 1187 | On a text-only terminal, when you reenter Emacs after suspending, Emacs | ||
| 1188 | normally clears the screen and redraws the entire display. On some | ||
| 1189 | terminals with more than one page of memory, it is possible to arrange | ||
| 1190 | the termcap entry so that the @samp{ti} and @samp{te} strings (output | ||
| 1191 | to the terminal when Emacs is entered and exited, respectively) switch | ||
| 1192 | between pages of memory so as to use one page for Emacs and another | ||
| 1193 | page for other output. Then you might want to set the variable | ||
| 1194 | @code{no-redraw-on-reenter} non-@code{nil}; this tells Emacs to | ||
| 1195 | assume, when resumed, that the screen page it is using still contains | ||
| 1196 | what Emacs last wrote there. | ||
| 1197 | |||
| 1222 | @ignore | 1198 | @ignore |
| 1223 | arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4 | 1199 | arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4 |
| 1224 | @end ignore | 1200 | @end ignore |