Mercurial > emacs
comparison lispref/positions.texi @ 34943:67ec449a2b50
Add count-screen-lines.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 02 Jan 2001 03:52:23 +0000 |
parents | d939cbd0aef4 |
children | 97f7986f0b80 |
comparison
equal
deleted
inserted
replaced
34942:af688bd6c419 | 34943:67ec449a2b50 |
---|---|
526 | 526 |
527 The value returned is the window line number point has moved to, with | 527 The value returned is the window line number point has moved to, with |
528 the top line in the window numbered 0. | 528 the top line in the window numbered 0. |
529 @end deffn | 529 @end deffn |
530 | 530 |
531 @defun count-screen-lines &optional beg end count-final-newline window | |
532 This function returns the number of the screen lines occupied by the | |
533 text between positions @var{beg} and @var{end}. These arguments default | |
534 to the beginning and end of the accessible portion of the buffer. | |
535 | |
536 If region ends with a newline, it is significant if | |
537 @var{count-final-newline} is non-@code{nil}. Otherwise it is ignored. | |
538 | |
539 The argument @var{window} specifies the window used for obtaining | |
540 parameters such as width, horizontal scrolling, and so on. The default | |
541 is the selected window. | |
542 | |
543 Like @code{vertical-motion}, @code{count-screen-lines} always uses the | |
544 current buffer, regardless of which buffer is displayed in @var{window}. | |
545 This makes possible to use @code{count-screen-lines} in any buffer, | |
546 whether or not it is currently displayed in some window. | |
547 @end defun | |
548 | |
531 @defun compute-motion from frompos to topos width offsets window | 549 @defun compute-motion from frompos to topos width offsets window |
532 This function scans the current buffer, calculating screen positions. | 550 This function scans the current buffer, calculating screen positions. |
533 It scans the buffer forward from position @var{from}, assuming that is | 551 It scans the buffer forward from position @var{from}, assuming that is |
534 at screen coordinates @var{frompos}, to position @var{to} or coordinates | 552 at screen coordinates @var{frompos}, to position @var{to} or coordinates |
535 @var{topos}, whichever comes first. It returns the ending buffer | 553 @var{topos}, whichever comes first. It returns the ending buffer |