diff options
| author | Richard M. Stallman | 2005-02-16 09:59:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-02-16 09:59:32 +0000 |
| commit | 0015d6775b2878c49b22efd085d2e8688a15c58e (patch) | |
| tree | a449a0a9c961bec4bb419f9f60e7578803589e2d | |
| parent | 065e46d08db0b977da7763e6c7d4cf18def33cf9 (diff) | |
| download | emacs-0015d6775b2878c49b22efd085d2e8688a15c58e.tar.gz emacs-0015d6775b2878c49b22efd085d2e8688a15c58e.zip | |
(Display): Reorder menu.
(Faces): Cleanup.
(Font Lock): Cleanup. Mention Options menu. Delete obsolete text.
(Scrolling): For C-l, don't presume text terminal.
(Horizontal Scrolling): Simplify intro.
(Follow Mode): Clarify.
(Cursor Display): Moved before Display Custom.
(Display Custom): Explain no-redraw-on-reenter is for text terminals.
Doc default-tab-width. Doc line truncation more thoroughly.
| -rw-r--r-- | man/display.texi | 210 |
1 files changed, 112 insertions, 98 deletions
diff --git a/man/display.texi b/man/display.texi index 23b79d1703e..c652b47787a 100644 --- a/man/display.texi +++ b/man/display.texi | |||
| @@ -23,20 +23,20 @@ display it. | |||
| 23 | * Selective Display:: Hiding lines with lots of indentation. | 23 | * Selective Display:: Hiding lines with lots of indentation. |
| 24 | * Optional Mode Line:: Optional mode line display features. | 24 | * Optional Mode Line:: Optional mode line display features. |
| 25 | * Text Display:: How text characters are normally displayed. | 25 | * Text Display:: How text characters are normally displayed. |
| 26 | * Display Custom:: Information on variables for customizing display. | ||
| 27 | * Cursor Display:: Features for displaying the cursor. | 26 | * Cursor Display:: Features for displaying the cursor. |
| 27 | * Display Custom:: Information on variables for customizing display. | ||
| 28 | @end menu | 28 | @end menu |
| 29 | 29 | ||
| 30 | @node Faces | 30 | @node Faces |
| 31 | @section Using Multiple Typefaces | 31 | @section Using Multiple Typefaces |
| 32 | @cindex faces | 32 | @cindex faces |
| 33 | 33 | ||
| 34 | Emacs supports using multiple styles of displaying characters. Each | 34 | You can specify various styles for displaying text using |
| 35 | style is called a @dfn{face}. Each face can specify various @dfn{face | 35 | @dfn{faces}. Each face can specify various @dfn{face attributes}, |
| 36 | attributes}, such as the font family, the height, weight and slant of | 36 | such as the font family, the height, weight and slant of the |
| 37 | the characters, the foreground and background color, and underlining | 37 | characters, the foreground and background color, and underlining or |
| 38 | or overlining. A face does not have to specify all of these | 38 | overlining. A face does not have to specify all of these attributes; |
| 39 | attributes; often it inherits many of them from another face. | 39 | often it inherits most of them from another face. |
| 40 | 40 | ||
| 41 | On a window system, all the Emacs face attributes are meaningful. | 41 | On a window system, all the Emacs face attributes are meaningful. |
| 42 | On a character terminal, only some of them work. Some character | 42 | On a character terminal, only some of them work. Some character |
| @@ -196,7 +196,7 @@ on your screen using the command @code{ps-print-buffer-with-faces}. | |||
| 196 | @cindex syntax highlighting and coloring | 196 | @cindex syntax highlighting and coloring |
| 197 | 197 | ||
| 198 | Font Lock mode is a minor mode, always local to a particular buffer, | 198 | Font Lock mode is a minor mode, always local to a particular buffer, |
| 199 | which highlights (or ``fontifies'') using various faces according to | 199 | which highlights (or ``fontifies'') the buffer contents according to |
| 200 | the syntax of the text you are editing. It can recognize comments and | 200 | the syntax of the text you are editing. It can recognize comments and |
| 201 | strings in most languages; in several languages, it can also recognize | 201 | strings in most languages; in several languages, it can also recognize |
| 202 | and properly highlight various other important constructs---for | 202 | and properly highlight various other important constructs---for |
| @@ -227,6 +227,10 @@ this: | |||
| 227 | (global-font-lock-mode 1) | 227 | (global-font-lock-mode 1) |
| 228 | @end example | 228 | @end example |
| 229 | 229 | ||
| 230 | @noindent | ||
| 231 | You can also specify this using the menu bar Options menu, specifying | ||
| 232 | first Syntax Highlighting and then Save Options. | ||
| 233 | |||
| 230 | Font Lock mode uses several specifically named faces to do its job, | 234 | Font Lock mode uses several specifically named faces to do its job, |
| 231 | including @code{font-lock-string-face}, @code{font-lock-comment-face}, | 235 | including @code{font-lock-string-face}, @code{font-lock-comment-face}, |
| 232 | and others. The easiest way to find them all is to use completion | 236 | and others. The easiest way to find them all is to use completion |
| @@ -248,10 +252,6 @@ Customize the faces interactively with @kbd{M-x customize-face}, as | |||
| 248 | described in @ref{Face Customization}. | 252 | described in @ref{Face Customization}. |
| 249 | @end itemize | 253 | @end itemize |
| 250 | 254 | ||
| 251 | To get the full benefit of Font Lock mode, you need to choose a | ||
| 252 | default font which has bold, italic, and bold-italic variants; or else | ||
| 253 | you need to have a color or gray-scale screen. | ||
| 254 | |||
| 255 | @vindex font-lock-maximum-decoration | 255 | @vindex font-lock-maximum-decoration |
| 256 | The variable @code{font-lock-maximum-decoration} specifies the | 256 | The variable @code{font-lock-maximum-decoration} specifies the |
| 257 | preferred level of fontification, for modes that provide multiple | 257 | preferred level of fontification, for modes that provide multiple |
| @@ -447,9 +447,10 @@ Scroll heuristically to bring useful information onto the screen | |||
| 447 | @kindex C-l | 447 | @kindex C-l |
| 448 | @findex recenter | 448 | @findex recenter |
| 449 | The most basic scrolling command is @kbd{C-l} (@code{recenter}) with | 449 | The most basic scrolling command is @kbd{C-l} (@code{recenter}) with |
| 450 | no argument. It clears the entire screen and redisplays all windows. | 450 | no argument. It scrolls the selected window so that point is halfway |
| 451 | In addition, it scrolls the selected window so that point is halfway | 451 | down from the top of the window. On a text terminal, it also clears |
| 452 | down from the top of the window. | 452 | the screen and redisplays all windows. That is useful in case the |
| 453 | screen is garbled (@pxref{Screen Garbled}). | ||
| 453 | 454 | ||
| 454 | @kindex C-v | 455 | @kindex C-v |
| 455 | @kindex M-v | 456 | @kindex M-v |
| @@ -566,17 +567,12 @@ window, Emacs recenters the window. By default, @code{scroll-margin} is | |||
| 566 | 567 | ||
| 567 | @dfn{Horizontal scrolling} means shifting all the lines sideways | 568 | @dfn{Horizontal scrolling} means shifting all the lines sideways |
| 568 | within a window---so that some of the text near the left margin is not | 569 | within a window---so that some of the text near the left margin is not |
| 569 | displayed at all. Emacs does this automatically in any window that | 570 | displayed at all. When the text in a window is scrolled horizontally, |
| 570 | uses line truncation rather than continuation: whenever point moves | 571 | text lines are truncated rather than continued (@pxref{Display |
| 571 | off the left or right edge of the screen, Emacs scrolls the buffer | 572 | Custom}). Whenever a window shows truncated lines, Emacs |
| 572 | horizontally to make point visible. | 573 | automatically updates its horizontal scrolling whenever point moves |
| 573 | 574 | off the left or right edge of the screen. You can also use these | |
| 574 | When a window has been scrolled horizontally, text lines are truncated | 575 | commands to do explicit horizontal scrolling. |
| 575 | rather than continued (@pxref{Continuation Lines}), with a @samp{$} | ||
| 576 | appearing in the first column when there is text truncated to the left, | ||
| 577 | and in the last column when there is text truncated to the right. | ||
| 578 | |||
| 579 | You can use these commands to do explicit horizontal scrolling. | ||
| 580 | 576 | ||
| 581 | @table @kbd | 577 | @table @kbd |
| 582 | @item C-x < | 578 | @item C-x < |
| @@ -602,10 +598,10 @@ attempting to do so has no effect. This means that you don't have to | |||
| 602 | calculate the argument precisely for @w{@kbd{C-x >}}; any sufficiently large | 598 | calculate the argument precisely for @w{@kbd{C-x >}}; any sufficiently large |
| 603 | argument will restore the normal display. | 599 | argument will restore the normal display. |
| 604 | 600 | ||
| 605 | If you scroll a window horizontally by hand, that sets a lower bound | 601 | If you use those commands to scroll a window horizontally, that sets |
| 606 | for automatic horizontal scrolling. Automatic scrolling will continue | 602 | a lower bound for automatic horizontal scrolling. Automatic scrolling |
| 607 | to scroll the window, but never farther to the right than the amount | 603 | will continue to scroll the window, but never farther to the right |
| 608 | you previously set by @code{scroll-left}. | 604 | than the amount you previously set by @code{scroll-left}. |
| 609 | 605 | ||
| 610 | @vindex hscroll-margin | 606 | @vindex hscroll-margin |
| 611 | The value of the variable @code{hscroll-margin} controls how close | 607 | The value of the variable @code{hscroll-margin} controls how close |
| @@ -708,12 +704,12 @@ currently doesn't work on character terminals.) | |||
| 708 | @cindex windows, synchronizing | 704 | @cindex windows, synchronizing |
| 709 | @cindex synchronizing windows | 705 | @cindex synchronizing windows |
| 710 | 706 | ||
| 711 | @dfn{Follow mode} is a minor mode that makes two windows showing the | 707 | @dfn{Follow mode} is a minor mode that makes two windows, both |
| 712 | same buffer scroll as one tall ``virtual window.'' To use Follow mode, | 708 | showing the same buffer, scroll as a single tall ``virtual window.'' |
| 713 | go to a frame with just one window, split it into two side-by-side | 709 | To use Follow mode, go to a frame with just one window, split it into |
| 714 | windows using @kbd{C-x 3}, and then type @kbd{M-x follow-mode}. From | 710 | two side-by-side windows using @kbd{C-x 3}, and then type @kbd{M-x |
| 715 | then on, you can edit the buffer in either of the two windows, or scroll | 711 | follow-mode}. From then on, you can edit the buffer in either of the |
| 716 | either one; the other window follows it. | 712 | two windows, or scroll either one; the other window follows it. |
| 717 | 713 | ||
| 718 | In Follow mode, if you move point outside the portion visible in one | 714 | In Follow mode, if you move point outside the portion visible in one |
| 719 | window and into the portion visible in the other window, that selects | 715 | window and into the portion visible in the other window, that selects |
| @@ -756,6 +752,9 @@ the three dots. | |||
| 756 | precedes hidden lines. Then there is no visible indication of the | 752 | precedes hidden lines. Then there is no visible indication of the |
| 757 | hidden lines. This variable becomes local automatically when set. | 753 | hidden lines. This variable becomes local automatically when set. |
| 758 | 754 | ||
| 755 | See also @ref{Outline Mode} for another way to hide part of | ||
| 756 | the text in a buffer. | ||
| 757 | |||
| 759 | @node Optional Mode Line | 758 | @node Optional Mode Line |
| 760 | @section Optional Mode Line Features | 759 | @section Optional Mode Line Features |
| 761 | 760 | ||
| @@ -914,6 +913,46 @@ they are displayed using their graphics (assuming your terminal supports | |||
| 914 | them), otherwise as escape sequences. @xref{Single-Byte Character | 913 | them), otherwise as escape sequences. @xref{Single-Byte Character |
| 915 | Support}. | 914 | Support}. |
| 916 | 915 | ||
| 916 | @node Cursor Display | ||
| 917 | @section Displaying the Cursor | ||
| 918 | |||
| 919 | @findex blink-cursor-mode | ||
| 920 | @vindex blink-cursor-alist | ||
| 921 | @cindex cursor, locating visually | ||
| 922 | @cindex cursor, blinking | ||
| 923 | You can customize the cursor's color, and whether it blinks, using | ||
| 924 | the @code{cursor} Custom group (@pxref{Easy Customization}). On | ||
| 925 | graphical terminals, the command @kbd{M-x blink-cursor-mode} enables | ||
| 926 | or disables the blinking of the cursor. (On text terminals, the | ||
| 927 | terminal itself blinks the cursor, and Emacs has no control over it.) | ||
| 928 | You can control how the cursor appears when it blinks off by setting | ||
| 929 | the variable @code{blink-cursor-alist}. | ||
| 930 | |||
| 931 | @cindex cursor in non-selected windows | ||
| 932 | @vindex cursor-in-non-selected-windows | ||
| 933 | Normally, the cursor appears in non-selected windows in the ``off'' | ||
| 934 | state, with the same appearance as when the blinking cursor blinks | ||
| 935 | ``off''. For a box cursor, this is a hollow box; for a bar cursor, | ||
| 936 | this is a thinner bar. To turn off cursors in non-selected windows, | ||
| 937 | customize the variable @code{cursor-in-non-selected-windows} and assign | ||
| 938 | it a @code{nil} value. | ||
| 939 | |||
| 940 | @vindex x-stretch-cursor | ||
| 941 | @cindex wide block cursor | ||
| 942 | On graphical terminals, Emacs can optionally draw the block cursor | ||
| 943 | as wide as the character under the cursor---for example, if the cursor | ||
| 944 | is on a tab character, it would cover the full width occupied by that | ||
| 945 | tab character. To enable this feature, set the variable | ||
| 946 | @code{x-stretch-cursor} to a non-@code{nil} value. | ||
| 947 | |||
| 948 | @findex hl-line-mode | ||
| 949 | @findex global-hl-line-mode | ||
| 950 | @cindex highlight current line | ||
| 951 | If you find it hard to see the cursor, you might like HL Line mode, | ||
| 952 | a minor mode that highlights the line containing point. Use @kbd{M-x | ||
| 953 | hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x | ||
| 954 | global-hl-line-mode} enables or disables the same mode globally. | ||
| 955 | |||
| 917 | @node Display Custom | 956 | @node Display Custom |
| 918 | @section Customization of Display | 957 | @section Customization of Display |
| 919 | 958 | ||
| @@ -937,18 +976,19 @@ to invert all the lines of the display from what they normally are. | |||
| 937 | If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts | 976 | If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts |
| 938 | to make the whole screen blink when it would normally make an audible bell | 977 | to make the whole screen blink when it would normally make an audible bell |
| 939 | sound. This variable has no effect if your terminal does not have a way | 978 | sound. This variable has no effect if your terminal does not have a way |
| 940 | to make the screen blink.@refill | 979 | to make the screen blink. |
| 941 | 980 | ||
| 942 | @vindex no-redraw-on-reenter | 981 | @vindex no-redraw-on-reenter |
| 943 | When you reenter Emacs after suspending, Emacs normally clears the | 982 | On a text terminal, when you reenter Emacs after suspending, Emacs |
| 944 | screen and redraws the entire display. On some terminals with more than | 983 | normally clears the screen and redraws the entire display. On some |
| 945 | one page of memory, it is possible to arrange the termcap entry so that | 984 | terminals with more than one page of memory, it is possible to arrange |
| 946 | the @samp{ti} and @samp{te} strings (output to the terminal when Emacs | 985 | the termcap entry so that the @samp{ti} and @samp{te} strings (output |
| 947 | is entered and exited, respectively) switch between pages of memory so | 986 | to the terminal when Emacs is entered and exited, respectively) switch |
| 948 | as to use one page for Emacs and another page for other output. Then | 987 | between pages of memory so as to use one page for Emacs and another |
| 949 | you might want to set the variable @code{no-redraw-on-reenter} | 988 | page for other output. Then you might want to set the variable |
| 950 | non-@code{nil}; this tells Emacs to assume, when resumed, that the | 989 | @code{no-redraw-on-reenter} non-@code{nil}; this tells Emacs to |
| 951 | screen page it is using still contains what Emacs last wrote there. | 990 | assume, when resumed, that the screen page it is using still contains |
| 991 | what Emacs last wrote there. | ||
| 952 | 992 | ||
| 953 | @vindex echo-keystrokes | 993 | @vindex echo-keystrokes |
| 954 | The variable @code{echo-keystrokes} controls the echoing of multi-character | 994 | The variable @code{echo-keystrokes} controls the echoing of multi-character |
| @@ -964,6 +1004,7 @@ default is initially @code{t}. @xref{Display Tables,, Display Tables, | |||
| 964 | elisp, The Emacs Lisp Reference Manual}. | 1004 | elisp, The Emacs Lisp Reference Manual}. |
| 965 | 1005 | ||
| 966 | @vindex tab-width | 1006 | @vindex tab-width |
| 1007 | @vindex default-tab-width | ||
| 967 | Normally, a tab character in the buffer is displayed as whitespace which | 1008 | Normally, a tab character in the buffer is displayed as whitespace which |
| 968 | extends to the next display tab stop position, and display tab stops come | 1009 | extends to the next display tab stop position, and display tab stops come |
| 969 | at intervals equal to eight spaces. The number of spaces per tab is | 1010 | at intervals equal to eight spaces. The number of spaces per tab is |
| @@ -971,18 +1012,31 @@ controlled by the variable @code{tab-width}, which is made local by | |||
| 971 | changing it, just like @code{ctl-arrow}. Note that how the tab character | 1012 | changing it, just like @code{ctl-arrow}. Note that how the tab character |
| 972 | in the buffer is displayed has nothing to do with the definition of | 1013 | in the buffer is displayed has nothing to do with the definition of |
| 973 | @key{TAB} as a command. The variable @code{tab-width} must have an | 1014 | @key{TAB} as a command. The variable @code{tab-width} must have an |
| 974 | integer value between 1 and 1000, inclusive. | 1015 | integer value between 1 and 1000, inclusive. The variable |
| 975 | 1016 | @code{default-tab-width} controls the default value of this variable | |
| 976 | @c @vindex truncate-lines @c No index entry here, because we have one | 1017 | for buffers where you have not set it locally. |
| 977 | @c in the continuation section. | 1018 | |
| 978 | If the variable @code{truncate-lines} is non-@code{nil}, then each | 1019 | @cindex truncation |
| 979 | line of text gets just one screen line for display; if the text line is | 1020 | @cindex line truncation, and fringes |
| 980 | too long, display shows only the part that fits. If | 1021 | As an alternative to continuation, Emacs can display long lines by |
| 981 | @code{truncate-lines} is @code{nil}, then long text lines display as | 1022 | @dfn{truncation}. This means that all the characters that do not fit |
| 982 | more than one screen line, enough to show the whole text of the line. | 1023 | in the width of the screen or window do not appear at all. On |
| 983 | @xref{Continuation Lines}. Altering the value of @code{truncate-lines} | 1024 | graphical terminals, a small straight arrow in the fringe indicates |
| 984 | makes it local to the current buffer; until that time, the default value | 1025 | truncation at either end of the line. On text terminals, @samp{$} |
| 985 | is in effect. The default is initially @code{nil}. | 1026 | appears in the first column when there is text truncated to the left, |
| 1027 | and in the last column when there is text truncated to the right. | ||
| 1028 | |||
| 1029 | @vindex truncate-lines | ||
| 1030 | @findex toggle-truncate-lines | ||
| 1031 | Horizontal scrolling automatically causes line truncation | ||
| 1032 | (@pxref{Horizontal Scrolling}). You can explicitly enable line | ||
| 1033 | truncation for a particular buffer with the command @kbd{M-x | ||
| 1034 | toggle-truncate-lines}. This works by locally changing the variable | ||
| 1035 | @code{truncate-lines}. If that variable is non-@code{nil}, long lines | ||
| 1036 | are truncated; if it is @code{nil}, they are continued onto multiple | ||
| 1037 | screen lines. Setting the variable @code{truncate-lines} in any way | ||
| 1038 | makes it local to the current buffer; until that time, the default | ||
| 1039 | value is in effect. The default value is normally @code{nil}. | ||
| 986 | 1040 | ||
| 987 | @c @vindex truncate-partial-width-windows @c Idx entry is in Split Windows. | 1041 | @c @vindex truncate-partial-width-windows @c Idx entry is in Split Windows. |
| 988 | If the variable @code{truncate-partial-width-windows} is | 1042 | If the variable @code{truncate-partial-width-windows} is |
| @@ -1066,46 +1120,6 @@ result in text that is hard to read. Call the function | |||
| 1066 | @code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} | 1120 | @code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} |
| 1067 | argument to suppress the effect of bold-face in this case. | 1121 | argument to suppress the effect of bold-face in this case. |
| 1068 | 1122 | ||
| 1069 | @node Cursor Display | ||
| 1070 | @section Displaying the Cursor | ||
| 1071 | |||
| 1072 | @findex blink-cursor-mode | ||
| 1073 | @vindex blink-cursor-alist | ||
| 1074 | @cindex cursor, locating visually | ||
| 1075 | @cindex cursor, blinking | ||
| 1076 | You can customize the cursor's color, and whether it blinks, using | ||
| 1077 | the @code{cursor} Custom group (@pxref{Easy Customization}). On | ||
| 1078 | graphical terminals, the command @kbd{M-x blink-cursor-mode} enables | ||
| 1079 | or disables the blinking of the cursor. (On text terminals, the | ||
| 1080 | terminal itself blinks the cursor, and Emacs has no control over it.) | ||
| 1081 | You can control how the cursor appears when it blinks off by setting | ||
| 1082 | the variable @code{blink-cursor-alist}. | ||
| 1083 | |||
| 1084 | @cindex cursor in non-selected windows | ||
| 1085 | @vindex cursor-in-non-selected-windows | ||
| 1086 | Normally, the cursor appears in non-selected windows in the ``off'' | ||
| 1087 | state, with the same appearance as when the blinking cursor blinks | ||
| 1088 | ``off''. For a box cursor, this is a hollow box; for a bar cursor, | ||
| 1089 | this is a thinner bar. To turn off cursors in non-selected windows, | ||
| 1090 | customize the variable @code{cursor-in-non-selected-windows} and assign | ||
| 1091 | it a @code{nil} value. | ||
| 1092 | |||
| 1093 | @vindex x-stretch-cursor | ||
| 1094 | @cindex wide block cursor | ||
| 1095 | On graphical terminals, Emacs can optionally draw the block cursor | ||
| 1096 | as wide as the character under the cursor---for example, if the cursor | ||
| 1097 | is on a tab character, it would cover the full width occupied by that | ||
| 1098 | tab character. To enable this feature, set the variable | ||
| 1099 | @code{x-stretch-cursor} to a non-@code{nil} value. | ||
| 1100 | |||
| 1101 | @findex hl-line-mode | ||
| 1102 | @findex global-hl-line-mode | ||
| 1103 | @cindex highlight current line | ||
| 1104 | If you find it hard to see the cursor, you might like HL Line mode, | ||
| 1105 | a minor mode that highlights the line containing point. Use @kbd{M-x | ||
| 1106 | hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x | ||
| 1107 | global-hl-line-mode} enables or disables the same mode globally. | ||
| 1108 | |||
| 1109 | @ignore | 1123 | @ignore |
| 1110 | arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4 | 1124 | arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4 |
| 1111 | @end ignore | 1125 | @end ignore |