annotate man/xemacs/display.texi @ 5797:a1808d52a34a

If the position of a window's cached point is deleted, use buffer point instead src/ChangeLog addition: 2014-06-17 Aidan Kehoe <kehoea@parhasard.net> * extents.h: * window.c: * window.c (unshow_buffer): * window.c (Fset_window_buffer): Use extents, rather than markers, for the window buffer point cache, so that when the text containing that window buffer point is deleted, the window display code uses the buffer's actual point instead of the position that the marker had been moved to. Fixes Michael Heinrich's problem of http://mid.gmane.org/6zr42uxtf5.fsf@elektra.science-computing.de , introduced by Ben's patch of https://bitbucket.org/xemacs/xemacs/commits/047d37eb70d70f43803 .
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 17 Jun 2014 20:55:45 +0100
parents c6b1500299a7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 @node Display, Search, Registers, Top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 @chapter Controlling the Display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 Since only part of a large buffer fits in the window, XEmacs tries to show
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 the part that is likely to be interesting. The display control commands
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 allow you to specify which part of the text you want to see.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 @item C-l
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 Clear frame and redisplay, scrolling the selected window to center
5686
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
12 point vertically within it (@code{recenter-top-bottom}).
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 @item C-v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 @itemx pgdn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 @itemx next
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 Scroll forward (a windowful or a specified number of lines) (@code{scroll-up}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 On most X keyboards, you can get this functionality using the key
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 labelled @samp{Page Down}, which generates either @kbd{next} or @kbd{pgdn}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 @item M-v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 @itemx pgup
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 @itemx prior
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 Scroll backward (@code{scroll-down}). On most X keyboards, you can get
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 this functionality using the key labelled @samp{Page Up}, which
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 generates either @kbd{prior} or @kbd{pgup}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 @item @var{arg} C-l
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 Scroll so point is on line @var{arg} (@code{recenter}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 @item C-x <
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 @itemx C-pgdn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 @itemx C-next
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 Scroll text in current window to the left (@code{scroll-left}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 @item C-x >
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 @itemx C-pgup
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 @itemx C-prior
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 Scroll to the right (@code{scroll-right}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 @item C-x $
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 Make deeply indented lines invisible (@code{set-selective-display}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 * Scrolling:: Moving text up and down in a window.
5686
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
41 * Recentering:: A scroll command that centers the current line.
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
42 * Automatic Scrolling:: Redisplay scrolls text automatically when needed.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 * Horizontal Scrolling:: Moving text left and right in a window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 * Selective Display:: Hiding lines with lots of indentation.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 * Display Vars:: Information on variables for customizing display.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47
5686
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
48 @node Scrolling, Recentering, Display, Display
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 @section Scrolling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 If a buffer contains text that is too large to fit entirely within the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 window that is displaying the buffer, XEmacs shows a contiguous section of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 the text. The section shown always contains point.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 @cindex scrolling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 @dfn{Scrolling} means moving text up or down in the window so that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 different parts of the text are visible. Scrolling forward means that text
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 moves up, and new text appears at the bottom. Scrolling backward moves
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 text down and new text appears at the top.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 Scrolling happens automatically if you move point past the bottom or top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 of the window. You can also explicitly request scrolling with the commands
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 in this section.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 @ifinfo
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 @item C-v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 @itemx pgdn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 @itemx next
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 Scroll forward (a windowful or a specified number of lines) (@code{scroll-up}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 @item M-v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 @itemx pgup
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 @itemx prior
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 Scroll backward (@code{scroll-down}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 @end ifinfo
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 @kindex C-v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 @kindex M-v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 @kindex pgup
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 @kindex pgdn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 @kindex next
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 @kindex prior
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 @findex scroll-up
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 @findex scroll-down
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 The scrolling commands @kbd{C-v} and @kbd{M-v} let you move all the text
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 in the window up or down a few lines. @kbd{C-v} (@code{scroll-up}) with an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 argument shows you that many more lines at the bottom of the window, moving
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 the text and point up together as @kbd{C-l} might. @kbd{C-v} with a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 negative argument shows you more lines at the top of the window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 @kbd{Meta-v} (@code{scroll-down}) is like @kbd{C-v}, but moves in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 opposite direction.@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 @vindex next-screen-context-lines
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 To read the buffer a windowful at a time, use @kbd{C-v} with no
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 argument. @kbd{C-v} takes the last two lines at the bottom of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 window and puts them at the top, followed by nearly a whole windowful of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 lines not previously visible. Point moves to the new top of the window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 if it was in the text scrolled off the top. @kbd{M-v} with no argument
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 moves backward with similar overlap. The number of lines of overlap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 across a @kbd{C-v} or @kbd{M-v} is controlled by the variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 @code{next-screen-context-lines}; by default, it is two.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103
5686
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
104 @node Recentering, Automatic Scrolling, Scrolling, Display
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
105 @section Recentering
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
106
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
107 @table @kbd
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
108 @item C-l
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
109 Scroll the selected window so the current line is the center-most text
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
110 line; on subsequent consecutive invocations, make the current line the
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
111 top line, the bottom line, and so on in cyclic order. Possibly
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
112 redisplay the screen too (@code{recenter-top-bottom}).
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
113
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
114 @item M-x recenter
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
115 Scroll the selected window so the current line is the center-most text
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
116 line. Possibly redisplay the screen too.
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
117
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
118 @item C-M-l
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
119 Scroll heuristically to bring useful information onto the screen
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
120 (@code{reposition-window}).
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
121 @end table
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
122
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
123 @kindex C-l
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
124 @findex recenter-top-bottom
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
125 The @kbd{C-l} (@code{recenter-top-bottom}) command @dfn{recenters}
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
126 the selected window, scrolling it so that the current screen line is
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
127 exactly in the center of the window, or as close to the center as
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
128 possible.
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
129
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
130 Typing @kbd{C-l} twice in a row (@kbd{C-l C-l}) scrolls the window
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
131 so that point is on the topmost screen line. Typing a third @kbd{C-l}
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
132 scrolls the window so that point is on the bottom-most screen line.
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
133 Each successive @kbd{C-l} cycles through these three positions.
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
134
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
135 @vindex recenter-positions
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
136 You can change the cycling order by customizing the list variable
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
137 @code{recenter-positions}. Each list element should be the symbol
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
138 @code{top}, @code{middle}, or @code{bottom}, or a number; an integer
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
139 means to move the line to the specified screen line, while a
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
140 floating-point number between 0.0 and 1.0 specifies a percentage of
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
141 the screen space from the top of the window. The default,
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
142 @code{(middle top bottom)}, is the cycling order described above.
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
143 Furthermore, if you change the variable @code{scroll-margin} to a
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
144 non-zero value @var{n}, @kbd{C-l} always leaves at least @var{n}
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
145 screen lines between point and the top or bottom of the window
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
146 (@pxref{Automatic Scrolling}).
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
147
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
148 You can also give @kbd{C-l} a prefix argument. A plain prefix
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
149 argument, @kbd{C-u C-l}, simply recenters point. A positive argument
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
150 @var{n} puts point @var{n} lines down from the top of the window. An
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
151 argument of zero puts point on the topmost line. A negative argument
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
152 @var{-n} puts point @var{n} lines from the bottom of the window. When
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
153 given an argument, @kbd{C-l} does not clear the screen or cycle
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
154 through different screen positions.
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
155
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
156 @findex recenter
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
157 The more primitive command @kbd{M-x recenter} behaves like
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
158 @code{recenter-top-bottom}, but does not cycle among screen positions.
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
159
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
160 @node Automatic Scrolling, Horizontal Scrolling, Recentering, Display
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
161 @section Automatic Scrolling
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 @vindex scroll-step
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 Scrolling happens automatically if point has moved out of the visible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 portion of the text when it is time to display. Usually scrolling is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 done to put point vertically centered within the window. However, if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 the variable @code{scroll-step} has a non-zero value, an attempt is made to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 scroll the buffer by that many lines; if that is enough to bring point back
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 into visibility, that is what happens.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 Scrolling happens automatically if point has moved out of the visible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 portion of the text when it is time to display. Usually scrolling is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 done to put point vertically centered within the window. However, if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 the variable @code{scroll-step} has a non-zero value, an attempt is made to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 scroll the buffer by that many lines; if that is enough to bring point back
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 into visibility, that is what happens.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 @vindex scroll-conservatively
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 If you set @code{scroll-step} to a small value because you want to use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 arrow keys to scroll the screen without recentering, the redisplay
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 preemption will likely make XEmacs keep recentering the screen when
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 scrolling fast, regardless of @code{scroll-step}. To prevent this, set
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 @code{scroll-conservatively} to a small value, which will have the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 result of overriding the redisplay preemption.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185
5686
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
186 @node Horizontal Scrolling, Selective Display, Automatic Scrolling, Display
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 @section Horizontal Scrolling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 @ifinfo
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 @item C-x <
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 Scroll text in current window to the left (@code{scroll-left}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 @item C-x >
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 Scroll to the right (@code{scroll-right}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 @end ifinfo
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 @kindex C-x <
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 @kindex C-x >
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 @findex scroll-left
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 @findex scroll-right
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 @cindex horizontal scrolling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 The text in a window can also be scrolled horizontally. This means that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 each line of text is shifted sideways in the window, and one or more
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 characters at the beginning of each line are not displayed at all. When a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 window has been scrolled horizontally in this way, text lines are truncated
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 rather than continued (@pxref{Continuation Lines}), with a @samp{$} appearing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 in the first column when there is text truncated to the left, and in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 last column when there is text truncated to the right.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 The command @kbd{C-x <} (@code{scroll-left}) scrolls the selected
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 window to the left by @var{n} columns with argument @var{n}. With no
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 argument, it scrolls by almost the full width of the window (two columns
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 less, to be precise). @kbd{C-x >} (@code{scroll-right}) scrolls
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 similarly to the right. The window cannot be scrolled any farther to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 the right once it is displaying normally (with each line starting at the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 window's left margin); attempting to do so has no effect.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218
5686
c6b1500299a7 recenter-top-bottom synced from GNU and new default for C-l
Mats Lidell <mats.lidell@cag.se>
parents: 428
diff changeset
219 @node Selective Display, Display Vars, Horizontal Scrolling, Display
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 @section Selective Display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 @findex set-selective-display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 @kindex C-x $
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 XEmacs can hide lines indented more than a certain number
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 of columns (you specify how many columns). This allows you to get an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 overview of a part of a program.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 To hide lines, type @kbd{C-x $} (@code{set-selective-display}) with a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 numeric argument @var{n}. (@xref{Arguments}, for information on giving
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 the argument.) Lines with at least @var{n} columns of indentation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 disappear from the screen. The only indication of their presence are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 three dots (@samp{@dots{}}), which appear at the end of each visible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 line that is followed by one or more invisible ones.@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 The invisible lines are still present in the buffer, and most editing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 commands see them as usual, so it is very easy to put point in the middle
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 of invisible text. When this happens, the cursor appears at the end of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 previous line, after the three dots. If point is at the end of the visible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 line, before the newline that ends it, the cursor appears before the three
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 dots.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 The commands @kbd{C-n} and @kbd{C-p} move across the invisible lines
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 as if they were not there.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 To make everything visible again, type @kbd{C-x $} with no argument.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 @node Display Vars,, Selective Display, Display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 @section Variables Controlling Display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 This section contains information for customization only. Beginning
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 users should skip it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 @vindex no-redraw-on-reenter
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 When you reenter XEmacs after suspending, XEmacs normally clears the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 screen and redraws the entire display. On some terminals with more than
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 one page of memory, it is possible to arrange the termcap entry so that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 the @samp{ti} and @samp{te} strings (output to the terminal when XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 is entered and exited, respectively) switch between pages of memory so
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 as to use one page for XEmacs and another page for other output. In that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 case, you might want to set the variable @code{no-redraw-on-reenter} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 non-@code{nil} so that XEmacs will assume, when resumed, that the screen
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 page it is using still contains what XEmacs last wrote there.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 @vindex echo-keystrokes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 The variable @code{echo-keystrokes} controls the echoing of multi-character
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 keys; its value is the number of seconds of pause required to cause echoing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 to start, or zero, meaning don't echo at all. @xref{Echo Area}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 @vindex ctl-arrow
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 If the variable @code{ctl-arrow} is @code{nil}, control characters in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 buffer are displayed with octal escape sequences, all except newline and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 tab. If its value is @code{t}, then control characters will be printed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 with an up-arrow, for example @kbd{^A}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 If its value is not @code{t} and not @code{nil}, then characters whose
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 code is greater than 160 (that is, the space character (32) with its
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 high bit set) will be assumed to be printable, and will be displayed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 without alteration. This is the default when running under X Windows,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 since XEmacs assumes an ISO/8859-1 character set (also known as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 ``Latin1''). The @code{ctl-arrow} variable may also be set to an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 integer, in which case all characters whose codes are greater than or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 equal to that value will be assumed to be printable.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 Altering the value of @code{ctl-arrow} makes it local to the current
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 buffer; until that time, the default value is in effect. @xref{Locals}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 @vindex tab-width
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 Normally, a tab character in the buffer is displayed as whitespace which
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 extends to the next display tab stop position, and display tab stops come
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 at intervals equal to eight spaces. The number of spaces per tab is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 controlled by the variable @code{tab-width}, which is made local by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 changing it, just like @code{ctl-arrow}. Note that how the tab character
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 in the buffer is displayed has nothing to do with the definition of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 @key{TAB} as a command.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 @vindex selective-display-ellipses
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 If you set the variable @code{selective-display-ellipses} to @code{nil},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 the three dots at the end of a line that precedes invisible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 lines do not appear. There is no visible indication of the invisible lines.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 This variable becomes local automatically when set.