diff options
| author | Dmitry Antipov | 2013-08-06 10:53:09 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-06 10:53:09 +0400 |
| commit | e30b79c1c52a4428189ca148c73e7ecc993c6f6a (patch) | |
| tree | a7f60977d16877bbe0f626429243ea19543ed84e /doc | |
| parent | 00012b86257f33dd4e08e79b814f4a7ad6010713 (diff) | |
| download | emacs-e30b79c1c52a4428189ca148c73e7ecc993c6f6a.tar.gz emacs-e30b79c1c52a4428189ca148c73e7ecc993c6f6a.zip | |
Use region cache to speedup bidi_find_paragraph_start.
* src/buffer.h (struct buffer): New member bidi_paragraph_cache.
Rename cache_long_line_scans to cache_long_scans.
* src/buffer.c (bset_cache_long_line_scans): Rename to
bset_cache_long_scans.
(Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
(Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
into account.
(syms_of_buffer): Rename cache-long-line-scans to
cache-long-scans. Adjust docstring.
* src/search.c (newline_cache_on_off):
* src/indent.c (width_run_cache_on_off): Adjust users.
* src/bidi.c (bidi_paragraph_cache_on_off): New function.
(bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
* src/insdel.c (prepare_to_modify_buffer): Invalidate
bidi_paragraph_cache if enabled.
* doc/lispref/positions.texi (Motion by Screen Lines):
* doc/lispref/display.texi (Truncation): Rename `cache-long-line-scans'
to `cache-long-scans'.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/positions.texi | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 82bc279fa5b..0aac5235a29 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * positions.texi (Motion by Screen Lines): | ||
| 4 | * display.texi (Truncation): Rename `cache-long-line-scans' | ||
| 5 | to `cache-long-scans'. | ||
| 6 | |||
| 1 | 2013-08-05 Xue Fuqiao <xfq.free@gmail.com> | 7 | 2013-08-05 Xue Fuqiao <xfq.free@gmail.com> |
| 2 | 8 | ||
| 3 | * windows.texi (Window Start and End): Add an index. | 9 | * windows.texi (Window Start and End): Add an index. |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index c5068425c66..59a6f5ce340 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -217,9 +217,9 @@ over the @code{line-prefix} variable. @xref{Special Properties}. | |||
| 217 | continuation to display them, computing the continuation lines can | 217 | continuation to display them, computing the continuation lines can |
| 218 | make redisplay slow. The column computation and indentation functions | 218 | make redisplay slow. The column computation and indentation functions |
| 219 | also become slow. Then you might find it advisable to set | 219 | also become slow. Then you might find it advisable to set |
| 220 | @code{cache-long-line-scans} to @code{t}. | 220 | @code{cache-long-scans} to @code{t}. |
| 221 | 221 | ||
| 222 | @defvar cache-long-line-scans | 222 | @defvar cache-long-scans |
| 223 | If this variable is non-@code{nil}, various indentation and motion | 223 | If this variable is non-@code{nil}, various indentation and motion |
| 224 | functions, and Emacs redisplay, cache the results of scanning the | 224 | functions, and Emacs redisplay, cache the results of scanning the |
| 225 | buffer, and consult the cache to avoid rescanning regions of the buffer | 225 | buffer, and consult the cache to avoid rescanning regions of the buffer |
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index e8b6166f63c..119ad98a53d 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi | |||
| @@ -483,7 +483,7 @@ Display}. | |||
| 483 | These functions scan text to determine where screen lines break, and | 483 | These functions scan text to determine where screen lines break, and |
| 484 | thus take time proportional to the distance scanned. If you intend to | 484 | thus take time proportional to the distance scanned. If you intend to |
| 485 | use them heavily, Emacs provides caches which may improve the | 485 | use them heavily, Emacs provides caches which may improve the |
| 486 | performance of your code. @xref{Truncation, cache-long-line-scans}. | 486 | performance of your code. @xref{Truncation, cache-long-scans}. |
| 487 | 487 | ||
| 488 | @defun vertical-motion count &optional window | 488 | @defun vertical-motion count &optional window |
| 489 | This function moves point to the start of the screen line @var{count} | 489 | This function moves point to the start of the screen line @var{count} |