comparison man/lispref/positions.texi @ 292:6cb5e14cd98e r21-0b44

Import from CVS: tag r21-0b44
author cvs
date Mon, 13 Aug 2007 10:37:15 +0200
parents c9fe270a4101
children 341dac730539
comparison
equal deleted inserted replaced
291:7aa74ac42bd2 292:6cb5e14cd98e
469 thus take time proportional to the distance scanned. If you intend to 469 thus take time proportional to the distance scanned. If you intend to
470 use them heavily, Emacs provides caches which may improve the 470 use them heavily, Emacs provides caches which may improve the
471 performance of your code. @xref{Text Lines, cache-long-line-scans}. 471 performance of your code. @xref{Text Lines, cache-long-line-scans}.
472 472
473 473
474 @defun vertical-motion count &optional window 474 @defun vertical-motion count &optional window pixels
475 This function moves point to the start of the frame line @var{count} 475 This function moves point to the start of the frame line @var{count}
476 frame lines down from the frame line containing point. If @var{count} 476 frame lines down from the frame line containing point. If @var{count}
477 is negative, it moves up instead. 477 is negative, it moves up instead. The optional second argument
478 478 @var{window} may be used to specify a window other than the
479 @code{vertical-motion} returns the number of lines moved. The value may 479 selected window in which to perform the motion.
480 be less in absolute value than @var{count} if the beginning or end of 480
481 the buffer was reached. 481 Normally, @code{vertical-motion} returns the number of lines moved. The
482 value may be less in absolute value than @var{count} if the beginning or
483 end of the buffer was reached. If the optional third argument,
484 @var{pixels} is non-@code{nil}, the vertical pixel height of the motion
485 which took place is returned instead of the actual number of lines
486 moved. A motion of zero lines returns the height of the current line.
482 487
483 Note that @code{vertical-motion} sets @var{window}'s buffer's point, not 488 Note that @code{vertical-motion} sets @var{window}'s buffer's point, not
484 @var{window}'s point. (This differs from FSF Emacs, which buggily always 489 @var{window}'s point. (This differs from FSF Emacs, which buggily always
485 sets current buffer's point, regardless of @var{window}.) 490 sets current buffer's point, regardless of @var{window}.)
486 @end defun 491 @end defun
487 492
488 @defun vertical-motion-pixels count &optional window 493 @defun vertical-motion-pixels count &optional window how
489 This function is identical to @code{vertical-motion}, except that it 494 This function moves point to the start of the frame line @var{pixels}
490 returns the vertical pixel height of the motino which took place, 495 vertical pixels down from the frame line containing point, or up if
491 instead of the actual number of lines moved. A motion of zero lines 496 @var{pixels} is negative. The optional second argument @var{window} is
492 returns the height of the current line. 497 the window to move in, and defaults to the selected window. The
498 optional third argument @var{how} specifies the stopping condition. A
499 negative integer indicates that the motion should be no more
500 than @var{pixels}. A positive value indicates that the
501 motion should be at least @var{pixels}. Any other value indicates
502 that the motion should be as close as possible to @var{pixels}.
493 @end defun 503 @end defun
494 504
495 @deffn Command move-to-window-line count &optional window 505 @deffn Command move-to-window-line count &optional window
496 This function moves point with respect to the text currently displayed 506 This function moves point with respect to the text currently displayed
497 in @var{window}, which defaults to the selected window. It moves point 507 in @var{window}, which defaults to the selected window. It moves point