summaryrefslogtreecommitdiff
path: root/lispref/windows.texi
diff options
context:
space:
mode:
Diffstat (limited to 'lispref/windows.texi')
-rw-r--r--lispref/windows.texi48
1 files changed, 27 insertions, 21 deletions
diff --git a/lispref/windows.texi b/lispref/windows.texi
index 9199ff0f8d2..bd4bad02137 100644
--- a/lispref/windows.texi
+++ b/lispref/windows.texi
@@ -597,7 +597,9 @@ when you need complete control.
@defun set-window-buffer window buffer-or-name
This function makes @var{window} display @var{buffer-or-name} as its
-contents. It returns @code{nil}.
+contents. It returns @code{nil}. This is the fundamental primitive
+for changing which buffer is displayed in a window, and all ways
+of doing that call this function.
@example
@group
@@ -669,6 +671,16 @@ If it is a frame, consider windows on that frame.
@end itemize
@end defun
+@defvar buffer-display-time
+@tindex buffer-display-time
+This variable records the time at which a buffer was last made visible
+in a window. It is always local in each buffer; each time
+@code{set-window-buffer} is called, it sets this variable to
+@code{(current-time)} in the specified buffer (@pxref{Time of Day}).
+When a buffer is first created, @code{buffer-display-count} starts out
+with the value @code{nil}.
+@end defvar
+
@node Displaying Buffers
@section Displaying Buffers in Windows
@cindex switching to a buffer
@@ -685,7 +697,8 @@ See the preceding section for
@ifinfo
@xref{Buffers and Windows}, for
@end ifinfo
-low-level functions that give you more precise control.
+low-level functions that give you more precise control. All of these
+functions work by calling @code{set-window-buffer}.
Do not use the functions in this section in order to make a buffer
current so that a Lisp program can access or modify it; they are too
@@ -786,14 +799,6 @@ don't care which other buffer is used; you just want to make sure that
This function returns @code{nil}.
@end deffn
-@tindex buffer-display-count
-@defvar buffer-display-count
-This variable is always buffer-local in each buffer. When the buffer is
-created, @code{buffer-display-count} has value 0. Each time the buffer
-is displayed in a window, that increments the value of
-@code{buffer-display-count}.
-@end defvar
-
@node Choosing Window
@section Choosing a Window for Display
@@ -1308,13 +1313,14 @@ Replaces three keystroke sequence C-u 0 C-l."
@section Horizontal Scrolling
@cindex horizontal scrolling
- Because we read English first from top to bottom and second from left
-to right, horizontal scrolling is not like vertical scrolling. Vertical
-scrolling involves selection of a contiguous portion of text to display.
-Horizontal scrolling causes part of each line to go off screen. The
-amount of horizontal scrolling is therefore specified as a number of
-columns rather than as a position in the buffer. It has nothing to do
-with the display-start position returned by @code{window-start}.
+ Because we read English from left to right in the ``inner loop'', and
+from top to bottom in the ``outer loop'', horizontal scrolling is not
+like vertical scrolling. Vertical scrolling involves selection of a
+contiguous portion of text to display, but horizontal scrolling causes
+part of each line to go off screen. The amount of horizontal scrolling
+is therefore specified as a number of columns rather than as a position
+in the buffer. It has nothing to do with the display-start position
+returned by @code{window-start}.
Usually, no horizontal scrolling is in effect; then the leftmost
column is at the left edge of the window. In this state, scrolling to
@@ -1838,8 +1844,8 @@ over. In most cases, @code{save-selected-window} (@pxref{Selecting
Windows}) is what you need here.
@end defvar
-@tindex redisplay-end-trigger-functions
@defvar redisplay-end-trigger-functions
+@tindex redisplay-end-trigger-functions
This abnormal hook is run whenever redisplay in window uses text that
extends past a specified end trigger position. You set the end trigger
position with the function @code{set-window-redisplay-end-trigger}. The
@@ -1849,19 +1855,19 @@ feature, and the trigger value is automatically reset to @code{nil} just
after the hook is run.
@end defvar
-@tindex set-window-redisplay-end-trigger
@defun set-window-redisplay-end-trigger window position
+@tindex set-window-redisplay-end-trigger
This function sets @var{window}'s end trigger position at
@var{position}.
@end defun
-@tindex window-redisplay-end-trigger
@defun window-redisplay-end-trigger window
+@tindex window-redisplay-end-trigger
This function returns @var{window}'s current end trigger position.
@end defun
-@tindex window-configuration-change-hook
@defvar window-configuration-change-hook
+@tindex window-configuration-change-hook
A normal hook that is run every time you change the window configuration
of an existing frame. This includes splitting or deleting windows,
changing the sizes of windows, or displaying a different buffer in a