mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-03 11:33:37 +00:00
Added Richard's diffs to this file, fixed a couple of small bugs
texinfo related bugs.
This commit is contained in:
parent
c36bcf1b4a
commit
3c29caa89c
@ -11,24 +11,25 @@ Emacs windows. See @ref{Display}, for information on how text is
|
||||
displayed in windows.
|
||||
|
||||
@menu
|
||||
* Basic Windows:: Basic information on using windows.
|
||||
* Splitting Windows:: Splitting one window into two windows.
|
||||
* Deleting Windows:: Deleting a window gives its space to other windows.
|
||||
* Selecting Windows:: The selected window is the one that you edit in.
|
||||
* Cyclic Window Ordering:: Moving around the existing windows.
|
||||
* Buffers and Windows:: Each window displays the contents of a buffer.
|
||||
* Displaying Buffers:: Higher-lever functions for displaying a buffer
|
||||
and choosing a window for it.
|
||||
* Choosing Window:: How to choose a window for displaying a buffer.
|
||||
* Window Point:: Each window has its own location of point.
|
||||
* Window Start:: The display-start position controls which text
|
||||
is on-screen in the window.
|
||||
* Vertical Scrolling:: Moving text up and down in the window.
|
||||
* Horizontal Scrolling:: Moving text sideways on the window.
|
||||
* Size of Window:: Accessing the size of a window.
|
||||
* Resizing Windows:: Changing the size of a window.
|
||||
* Coordinates and Windows::Converting coordinates to windows.
|
||||
* Window Configurations:: Saving and restoring the state of the screen.
|
||||
* Basic Windows:: Basic information on using windows.
|
||||
* Splitting Windows:: Splitting one window into two windows.
|
||||
* Deleting Windows:: Deleting a window gives its space to other windows.
|
||||
* Selecting Windows:: The selected window is the one that you edit in.
|
||||
* Cyclic Window Ordering:: Moving around the existing windows.
|
||||
* Buffers and Windows:: Each window displays the contents of a buffer.
|
||||
* Displaying Buffers:: Higher-lever functions for displaying a buffer
|
||||
and choosing a window for it.
|
||||
* Choosing Window:: How to choose a window for displaying a buffer.
|
||||
* Window Point:: Each window has its own location of point.
|
||||
* Window Start:: The display-start position controls which text
|
||||
is on-screen in the window.
|
||||
* Vertical Scrolling:: Moving text up and down in the window.
|
||||
* Scrolling Hooks:: Hooks that run when you scroll a window.
|
||||
* Horizontal Scrolling:: Moving text sideways on the window.
|
||||
* Size of Window:: Accessing the size of a window.
|
||||
* Resizing Windows:: Changing the size of a window.
|
||||
* Coordinates and Windows:: Converting coordinates to windows.
|
||||
* Window Configurations:: Saving and restoring the state of the screen.
|
||||
@end menu
|
||||
|
||||
@node Basic Windows
|
||||
@ -417,9 +418,15 @@ The return value is @var{window}.
|
||||
@defmac save-selected-window forms@dots{}
|
||||
This macro records the selected window, executes @var{forms}
|
||||
in sequence, then restores the earlier selected window.
|
||||
It does not save or restore anything about the sizes, arrangement
|
||||
|
||||
This macro does not save or restore anything about the sizes, arrangement
|
||||
or contents of windows; therefore, if the @var{forms} change them,
|
||||
the changes are permanent.
|
||||
the change persists.
|
||||
|
||||
Each frame, at any time, has a window selected within the frame. This
|
||||
macro only saves @emph{the} selected window; it does not save anything
|
||||
about other frames. If the @var{forms} select some other frame and
|
||||
alter the window selected within it, the change persists.
|
||||
@end defmac
|
||||
|
||||
@cindex finding windows
|
||||
@ -639,6 +646,32 @@ If it is a frame, consider windows on that frame.
|
||||
@end itemize
|
||||
@end defun
|
||||
|
||||
@defun get-buffer-window-list buffer-or-name &optional minibuf all-frames
|
||||
This function returns a list of all the windows currently displaying
|
||||
@var{buffer-or-name}.
|
||||
|
||||
The two optional arguments work like the optional arguments of
|
||||
@code{next-window} (@pxref{Cyclic Window Ordering}); they are @emph{not}
|
||||
like the single optional argument of @code{get-buffer-window}. Perhaps
|
||||
we should change @code{get-buffer-window} in the future to make it
|
||||
compatible with the other functions.
|
||||
|
||||
The argument @var{all-frames} controls which windows to consider.
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
If it is @code{nil}, consider windows on the selected frame.
|
||||
@item
|
||||
If it is @code{t}, consider windows on all frames.
|
||||
@item
|
||||
If it is @code{visible}, consider windows on all visible frames.
|
||||
@item
|
||||
If it is 0, consider windows on all visible or iconified frames.
|
||||
@item
|
||||
If it is a frame, consider windows on that frame.
|
||||
@end itemize
|
||||
@end defun
|
||||
|
||||
@node Displaying Buffers
|
||||
@section Displaying Buffers in Windows
|
||||
@cindex switching to a buffer
|
||||
@ -1260,6 +1293,57 @@ Replaces three keystroke sequence C-u 0 C-l."
|
||||
@end example
|
||||
@end deffn
|
||||
|
||||
@node Scrolling Hooks
|
||||
@section Hooks for Vertical Scrolling
|
||||
|
||||
This section describes how a Lisp program can take action whenever a
|
||||
window displays a different part of its buffer or a different buffer.
|
||||
There are three actions that can change this: scrolling the window,
|
||||
switching buffers in the window, and changing the size of the window.
|
||||
The first two actions run @code{window-scroll-functions}; the last runs
|
||||
@code{window-size-change-functions}. The paradigmatic use of these
|
||||
hooks is Lazy Lock mode; see @ref{Support Modes, Lazy Lock, Font Lock
|
||||
Support Modes, emacs, The GNU Emacs Manual}.
|
||||
|
||||
@defvar window-scroll-functions
|
||||
This variable holds a list of functions that Emacs should call before
|
||||
redisplaying a window with scrolling. It is not a normal hook, because
|
||||
each function is called with two arguments: the window, and its new
|
||||
display-start position.
|
||||
|
||||
Displaying a different buffer in the window also runs these functions.
|
||||
|
||||
These functions cannot expect @code{window-end} (@pxref{Window Start})
|
||||
to return a meaningful value, because that value is updated only by
|
||||
redisplaying the buffer. So if one of these functions needs to know the
|
||||
last character that will fit in the window with its current
|
||||
display-start position, it has to find that character using
|
||||
@code{vertical-motion} (@pxref{Screen Lines}).
|
||||
@end defvar
|
||||
|
||||
@defvar window-size-change-functions
|
||||
This variable holds a list of functions to be called if the size of any
|
||||
window changes for any reason. The functions are called just once per
|
||||
redisplay, and just once for each frame on which size changes have
|
||||
occurred.
|
||||
|
||||
Each function receives the frame as its sole argument. There is no
|
||||
direct way to find out which windows on that frame have changed size, or
|
||||
precisely how. However, if a size-change function records, at each
|
||||
call, the existing windows and their sizes, it can also compare the
|
||||
present sizes and the previous sizes.
|
||||
|
||||
Creating or deleting windows counts as a size change, and therefore
|
||||
causes these functions to be called. Changing the frame size also
|
||||
counts, because it changes the sizes of the existing windows.
|
||||
|
||||
It is not a good idea to use @code{save-window-excursion} (@pxref{Window
|
||||
Configurations}) in these functions, because that always counts as a
|
||||
size change, and it would cause these functions to be called over and
|
||||
over. In most cases, @code{save-selected-window} (@pxref{Selecting
|
||||
Windows}) is what you need here.
|
||||
@end defvar
|
||||
|
||||
@node Horizontal Scrolling
|
||||
@section Horizontal Scrolling
|
||||
@cindex horizontal scrolling
|
||||
@ -1580,28 +1664,6 @@ created narrower than this. The absolute minimum width is one; any
|
||||
value below that is ignored. The default value is 10.
|
||||
@end defopt
|
||||
|
||||
@defvar window-size-change-functions
|
||||
This variable holds a list of functions to be called if the size of any
|
||||
window changes for any reason. The functions are called just once per
|
||||
redisplay, and just once for each frame on which size changes have
|
||||
occurred.
|
||||
|
||||
Each function receives the frame as its sole argument. There is no
|
||||
direct way to find out which windows changed size, or precisely how;
|
||||
however, if your size-change function keeps track, after each change, of
|
||||
the windows that interest you, you can figure out what has changed by
|
||||
comparing the old size data with the new.
|
||||
|
||||
Creating or deleting windows counts as a size change, and therefore
|
||||
causes these functions to be called. Changing the frame size also
|
||||
counts, because it changes the sizes of the existing windows.
|
||||
|
||||
It is not a good idea to use @code{save-window-excursion} in these
|
||||
functions, because that always counts as a size change, and it would
|
||||
cause these functions to be called over and over. In most cases,
|
||||
@code{save-selected-window} is what you need here.
|
||||
@end defvar
|
||||
|
||||
@node Coordinates and Windows
|
||||
@section Coordinates and Windows
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user