diff options
| author | Eli Zaretskii | 2015-02-09 18:24:46 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-02-09 18:24:46 +0200 |
| commit | 403cb178c75a80603dbd8ed23e342d2109645401 (patch) | |
| tree | 815315bef8212ed239805f13089612ebcef78a82 /doc | |
| parent | af560cd6f15e7cc7e42bff5b3c802b9d1d1640b5 (diff) | |
| download | emacs-403cb178c75a80603dbd8ed23e342d2109645401.tar.gz emacs-403cb178c75a80603dbd8ed23e342d2109645401.zip | |
Speed up vertical-motion when screen coordinates are known
src/indent.c (Fvertical_motion): Accept an additional argument
CUR-COL and use it as the starting screen coordinate.
src/window.c (window_scroll_line_based, Fmove_to_window_line): All
callers of vertical-motion changed.
doc/lispref/positions.texi (Screen Lines): Update the documentation of
vertical-motion to document the new additional argument.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/positions.texi | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 3fe3d6fd6a0..0c76a6b8b34 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-02-09 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * positions.texi (Screen Lines): Update the documentation of | ||
| 4 | vertical-motion to document the new additional argument. | ||
| 5 | |||
| 1 | 2015-02-06 Nicolas Petton <nicolas@petton.fr> | 6 | 2015-02-06 Nicolas Petton <nicolas@petton.fr> |
| 2 | 7 | ||
| 3 | * sequences.texi (Sequence Functions): Add documentation for | 8 | * sequences.texi (Sequence Functions): Add documentation for |
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index 317b9d64a5c..b74116ebf1d 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi | |||
| @@ -493,7 +493,7 @@ If you intend to use them heavily, Emacs provides caches which may | |||
| 493 | improve the performance of your code. @xref{Truncation, cache-long-scans}. | 493 | improve the performance of your code. @xref{Truncation, cache-long-scans}. |
| 494 | @end ignore | 494 | @end ignore |
| 495 | 495 | ||
| 496 | @defun vertical-motion count &optional window | 496 | @defun vertical-motion count &optional window cur-col |
| 497 | This function moves point to the start of the screen line @var{count} | 497 | This function moves point to the start of the screen line @var{count} |
| 498 | screen lines down from the screen line containing point. If @var{count} | 498 | screen lines down from the screen line containing point. If @var{count} |
| 499 | is negative, it moves up instead. | 499 | is negative, it moves up instead. |
| @@ -515,6 +515,14 @@ The window @var{window} is used for obtaining parameters such as the | |||
| 515 | width, the horizontal scrolling, and the display table. But | 515 | width, the horizontal scrolling, and the display table. But |
| 516 | @code{vertical-motion} always operates on the current buffer, even if | 516 | @code{vertical-motion} always operates on the current buffer, even if |
| 517 | @var{window} currently displays some other buffer. | 517 | @var{window} currently displays some other buffer. |
| 518 | |||
| 519 | The optional argument @var{cur-col} specifies the current column when | ||
| 520 | the function is called. This is the window-relative horizontal | ||
| 521 | coordinate of point, measured in units of font width of the frame's | ||
| 522 | default face. Providing it speeds up the function, especially in very | ||
| 523 | long lines, because it doesn't have to go back in the buffer in order | ||
| 524 | to determine the current column. Note that @var{cur-col} is also | ||
| 525 | counted from the visual start of the line. | ||
| 518 | @end defun | 526 | @end defun |
| 519 | 527 | ||
| 520 | @defun count-screen-lines &optional beg end count-final-newline window | 528 | @defun count-screen-lines &optional beg end count-final-newline window |