Mercurial > emacs
comparison doc/lispref/windows.texi @ 99760:690624ab76e0
(Displaying Buffers, Vertical Scrolling)
(Horizontal Scrolling): Fix indenting and rewording issues
introduced with 2008-11-07 change.
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Fri, 21 Nov 2008 07:39:45 +0000 |
parents | 3c7c38bba785 |
children | c69004518f91 |
comparison
equal
deleted
inserted
replaced
99759:f0e4d86dd0da | 99760:690624ab76e0 |
---|---|
814 | 814 |
815 The next two functions are similar to @code{switch-to-buffer}, except | 815 The next two functions are similar to @code{switch-to-buffer}, except |
816 for the described features. | 816 for the described features. |
817 | 817 |
818 @deffn Command switch-to-buffer-other-window buffer-or-name &optional norecord | 818 @deffn Command switch-to-buffer-other-window buffer-or-name &optional norecord |
819 This function makes @var{buffer-or-name} the current buffer, displays it | 819 This function makes the buffer specified by @var{buffer-or-name} current |
820 in a window not currently selected, and selects that window. The | 820 and displays it in a window not currently selected. It then selects |
821 handling of the buffer is the same as in @code{switch-to-buffer}. | 821 that window. The handling of the buffer is the same as in |
822 @code{switch-to-buffer}. | |
822 | 823 |
823 The currently selected window is absolutely never used to do the job. | 824 The currently selected window is absolutely never used to do the job. |
824 If it is the only window, then it is split to make a distinct window for | 825 If it is the only window, then it is split to make a distinct window for |
825 this purpose. If the selected window is already displaying the buffer, | 826 this purpose. If the selected window is already displaying the buffer, |
826 then it continues to do so, but another window is nonetheless found to | 827 then it continues to do so, but another window is nonetheless found to |
1263 As long as the selected window displays the current buffer, the window's | 1264 As long as the selected window displays the current buffer, the window's |
1264 point and the buffer's point always move together; they remain equal. | 1265 point and the buffer's point always move together; they remain equal. |
1265 @end itemize | 1266 @end itemize |
1266 | 1267 |
1267 @cindex cursor | 1268 @cindex cursor |
1268 As far as the user is concerned, point is where the cursor is, and | 1269 As far as the user is concerned, point is where the cursor is, and |
1269 when the user switches to another buffer, the cursor jumps to the | 1270 when the user switches to another buffer, the cursor jumps to the |
1270 position of point in that buffer. | 1271 position of point in that buffer. |
1271 | 1272 |
1272 @defun window-point &optional window | 1273 @defun window-point &optional window |
1273 This function returns the current position of point in @var{window}. | 1274 This function returns the current position of point in @var{window}. |
1706 @node Vertical Scrolling | 1707 @node Vertical Scrolling |
1707 @section Vertical Fractional Scrolling | 1708 @section Vertical Fractional Scrolling |
1708 @cindex vertical fractional scrolling | 1709 @cindex vertical fractional scrolling |
1709 @cindex vertical scroll position | 1710 @cindex vertical scroll position |
1710 | 1711 |
1711 @dfn{Vertical fractional scrolling} means shifting text in a window up | 1712 @dfn{Vertical fractional scrolling} means shifting text in a window |
1712 or down by a specified multiple or fraction of a line. Each window has | 1713 up or down by a specified multiple or fraction of a line. Each window |
1713 a @dfn{vertical scroll position}, which is a number, never less than | 1714 has a @dfn{vertical scroll position}, which is a number, never less than |
1714 zero. It specifies how far to raise the contents of the window. | 1715 zero. It specifies how far to raise the contents of the window. |
1715 Raising the window contents generally makes all or part of some lines | 1716 Raising the window contents generally makes all or part of some lines |
1716 disappear off the top, and all or part of some other lines appear at the | 1717 disappear off the top, and all or part of some other lines appear at the |
1717 bottom. The usual value is zero. | 1718 bottom. The usual value is zero. |
1718 | 1719 |
1719 The vertical scroll position is measured in units of the normal line | 1720 The vertical scroll position is measured in units of the normal line |
1720 height, which is the height of the default font. Thus, if the value is | 1721 height, which is the height of the default font. Thus, if the value is |
1721 .5, that means the window contents are scrolled up half the normal line | 1722 .5, that means the window contents are scrolled up half the normal line |
1722 height. If it is 3.3, that means the window contents are scrolled up | 1723 height. If it is 3.3, that means the window contents are scrolled up |
1723 somewhat over three times the normal line height. | 1724 somewhat over three times the normal line height. |
1724 | 1725 |
1725 What fraction of a line the vertical scrolling covers, or how many | 1726 What fraction of a line the vertical scrolling covers, or how many |
1726 lines, depends on what the lines contain. A value of .5 could scroll a | 1727 lines, depends on what the lines contain. A value of .5 could scroll a |
1727 line whose height is very short off the screen, while a value of 3.3 | 1728 line whose height is very short off the screen, while a value of 3.3 |
1728 could scroll just part of the way through a tall line or an image. | 1729 could scroll just part of the way through a tall line or an image. |
1729 | 1730 |
1730 @defun window-vscroll &optional window pixels-p | 1731 @defun window-vscroll &optional window pixels-p |
1894 @result{} 10 | 1895 @result{} 10 |
1895 @end group | 1896 @end group |
1896 @end example | 1897 @end example |
1897 @end defun | 1898 @end defun |
1898 | 1899 |
1899 Here is how you can determine whether a given position @var{position} is | 1900 Here is how you can determine whether a given position @var{position} |
1900 off the screen due to horizontal scrolling: | 1901 is off the screen due to horizontal scrolling: |
1901 | 1902 |
1902 @example | 1903 @example |
1903 @group | 1904 @group |
1904 (defun hscroll-on-screen (window position) | 1905 (defun hscroll-on-screen (window position) |
1905 (save-excursion | 1906 (save-excursion |
2080 @cindex window resizing | 2081 @cindex window resizing |
2081 @cindex resize window | 2082 @cindex resize window |
2082 @cindex changing window size | 2083 @cindex changing window size |
2083 @cindex window size, changing | 2084 @cindex window size, changing |
2084 | 2085 |
2085 The window size functions fall into two classes: high-level commands | 2086 The window size functions fall into two classes: high-level commands |
2086 that change the size of windows and low-level functions that access | 2087 that change the size of windows and low-level functions that access |
2087 window size. Emacs does not permit overlapping windows or gaps between | 2088 window size. Emacs does not permit overlapping windows or gaps between |
2088 windows, so resizing a window always affects at least one other window. | 2089 windows, so resizing a window always affects at least one other window. |
2089 | 2090 |
2090 @deffn Command enlarge-window size &optional horizontal | 2091 @deffn Command enlarge-window size &optional horizontal |