aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-02-16 09:59:32 +0000
committerRichard M. Stallman2005-02-16 09:59:32 +0000
commit0015d6775b2878c49b22efd085d2e8688a15c58e (patch)
treea449a0a9c961bec4bb419f9f60e7578803589e2d
parent065e46d08db0b977da7763e6c7d4cf18def33cf9 (diff)
downloademacs-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.texi210
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
35style is called a @dfn{face}. Each face can specify various @dfn{face 35@dfn{faces}. Each face can specify various @dfn{face attributes},
36attributes}, such as the font family, the height, weight and slant of 36such as the font family, the height, weight and slant of the
37the characters, the foreground and background color, and underlining 37characters, the foreground and background color, and underlining or
38or overlining. A face does not have to specify all of these 38overlining. A face does not have to specify all of these attributes;
39attributes; often it inherits many of them from another face. 39often 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.
42On a character terminal, only some of them work. Some character 42On 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,
199which highlights (or ``fontifies'') using various faces according to 199which highlights (or ``fontifies'') the buffer contents according to
200the syntax of the text you are editing. It can recognize comments and 200the syntax of the text you are editing. It can recognize comments and
201strings in most languages; in several languages, it can also recognize 201strings in most languages; in several languages, it can also recognize
202and properly highlight various other important constructs---for 202and 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
231You can also specify this using the menu bar Options menu, specifying
232first 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,
231including @code{font-lock-string-face}, @code{font-lock-comment-face}, 235including @code{font-lock-string-face}, @code{font-lock-comment-face},
232and others. The easiest way to find them all is to use completion 236and 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
248described in @ref{Face Customization}. 252described 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
252default font which has bold, italic, and bold-italic variants; or else
253you 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
257preferred level of fontification, for modes that provide multiple 257preferred 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
450no argument. It clears the entire screen and redisplays all windows. 450no argument. It scrolls the selected window so that point is halfway
451In addition, it scrolls the selected window so that point is halfway 451down from the top of the window. On a text terminal, it also clears
452down from the top of the window. 452the screen and redisplays all windows. That is useful in case the
453screen 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
568within a window---so that some of the text near the left margin is not 569within a window---so that some of the text near the left margin is not
569displayed at all. Emacs does this automatically in any window that 570displayed at all. When the text in a window is scrolled horizontally,
570uses line truncation rather than continuation: whenever point moves 571text lines are truncated rather than continued (@pxref{Display
571off the left or right edge of the screen, Emacs scrolls the buffer 572Custom}). Whenever a window shows truncated lines, Emacs
572horizontally to make point visible. 573automatically updates its horizontal scrolling whenever point moves
573 574off 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 575commands to do explicit horizontal scrolling.
575rather than continued (@pxref{Continuation Lines}), with a @samp{$}
576appearing in the first column when there is text truncated to the left,
577and 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
602calculate the argument precisely for @w{@kbd{C-x >}}; any sufficiently large 598calculate the argument precisely for @w{@kbd{C-x >}}; any sufficiently large
603argument will restore the normal display. 599argument 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
606for automatic horizontal scrolling. Automatic scrolling will continue 602a lower bound for automatic horizontal scrolling. Automatic scrolling
607to scroll the window, but never farther to the right than the amount 603will continue to scroll the window, but never farther to the right
608you previously set by @code{scroll-left}. 604than 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
712same buffer scroll as one tall ``virtual window.'' To use Follow mode, 708showing the same buffer, scroll as a single tall ``virtual window.''
713go to a frame with just one window, split it into two side-by-side 709To use Follow mode, go to a frame with just one window, split it into
714windows using @kbd{C-x 3}, and then type @kbd{M-x follow-mode}. From 710two side-by-side windows using @kbd{C-x 3}, and then type @kbd{M-x
715then on, you can edit the buffer in either of the two windows, or scroll 711follow-mode}. From then on, you can edit the buffer in either of the
716either one; the other window follows it. 712two 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
719window and into the portion visible in the other window, that selects 715window and into the portion visible in the other window, that selects
@@ -756,6 +752,9 @@ the three dots.
756precedes hidden lines. Then there is no visible indication of the 752precedes hidden lines. Then there is no visible indication of the
757hidden lines. This variable becomes local automatically when set. 753hidden lines. This variable becomes local automatically when set.
758 754
755 See also @ref{Outline Mode} for another way to hide part of
756the 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
914them), otherwise as escape sequences. @xref{Single-Byte Character 913them), otherwise as escape sequences. @xref{Single-Byte Character
915Support}. 914Support}.
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
924the @code{cursor} Custom group (@pxref{Easy Customization}). On
925graphical terminals, the command @kbd{M-x blink-cursor-mode} enables
926or disables the blinking of the cursor. (On text terminals, the
927terminal itself blinks the cursor, and Emacs has no control over it.)
928You can control how the cursor appears when it blinks off by setting
929the 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''
934state, 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,
936this is a thinner bar. To turn off cursors in non-selected windows,
937customize the variable @code{cursor-in-non-selected-windows} and assign
938it 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
943as wide as the character under the cursor---for example, if the cursor
944is on a tab character, it would cover the full width occupied by that
945tab 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,
952a minor mode that highlights the line containing point. Use @kbd{M-x
953hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x
954global-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
938to make the whole screen blink when it would normally make an audible bell 977to make the whole screen blink when it would normally make an audible bell
939sound. This variable has no effect if your terminal does not have a way 978sound. This variable has no effect if your terminal does not have a way
940to make the screen blink.@refill 979to 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
944screen and redraws the entire display. On some terminals with more than 983normally clears the screen and redraws the entire display. On some
945one page of memory, it is possible to arrange the termcap entry so that 984terminals with more than one page of memory, it is possible to arrange
946the @samp{ti} and @samp{te} strings (output to the terminal when Emacs 985the termcap entry so that the @samp{ti} and @samp{te} strings (output
947is entered and exited, respectively) switch between pages of memory so 986to the terminal when Emacs is entered and exited, respectively) switch
948as to use one page for Emacs and another page for other output. Then 987between pages of memory so as to use one page for Emacs and another
949you might want to set the variable @code{no-redraw-on-reenter} 988page for other output. Then you might want to set the variable
950non-@code{nil}; this tells Emacs to assume, when resumed, that the 989@code{no-redraw-on-reenter} non-@code{nil}; this tells Emacs to
951screen page it is using still contains what Emacs last wrote there. 990assume, when resumed, that the screen page it is using still contains
991what 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,
964elisp, The Emacs Lisp Reference Manual}. 1004elisp, 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
968extends to the next display tab stop position, and display tab stops come 1009extends to the next display tab stop position, and display tab stops come
969at intervals equal to eight spaces. The number of spaces per tab is 1010at 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
971changing it, just like @code{ctl-arrow}. Note that how the tab character 1012changing it, just like @code{ctl-arrow}. Note that how the tab character
972in the buffer is displayed has nothing to do with the definition of 1013in 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
974integer value between 1 and 1000, inclusive. 1015integer 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 1017for 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
979line of text gets just one screen line for display; if the text line is 1020@cindex line truncation, and fringes
980too 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
982more than one screen line, enough to show the whole text of the line. 1023in the width of the screen or window do not appear at all. On
983@xref{Continuation Lines}. Altering the value of @code{truncate-lines} 1024graphical terminals, a small straight arrow in the fringe indicates
984makes it local to the current buffer; until that time, the default value 1025truncation at either end of the line. On text terminals, @samp{$}
985is in effect. The default is initially @code{nil}. 1026appears in the first column when there is text truncated to the left,
1027and 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
1033truncation for a particular buffer with the command @kbd{M-x
1034toggle-truncate-lines}. This works by locally changing the variable
1035@code{truncate-lines}. If that variable is non-@code{nil}, long lines
1036are truncated; if it is @code{nil}, they are continued onto multiple
1037screen lines. Setting the variable @code{truncate-lines} in any way
1038makes it local to the current buffer; until that time, the default
1039value 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}
1067argument to suppress the effect of bold-face in this case. 1121argument 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
1077the @code{cursor} Custom group (@pxref{Easy Customization}). On
1078graphical terminals, the command @kbd{M-x blink-cursor-mode} enables
1079or disables the blinking of the cursor. (On text terminals, the
1080terminal itself blinks the cursor, and Emacs has no control over it.)
1081You can control how the cursor appears when it blinks off by setting
1082the 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''
1087state, 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,
1089this is a thinner bar. To turn off cursors in non-selected windows,
1090customize the variable @code{cursor-in-non-selected-windows} and assign
1091it 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
1096as wide as the character under the cursor---for example, if the cursor
1097is on a tab character, it would cover the full width occupied by that
1098tab 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,
1105a minor mode that highlights the line containing point. Use @kbd{M-x
1106hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x
1107global-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