diff options
| author | Jim Blandy | 1994-10-10 16:01:58 +0000 |
|---|---|---|
| committer | Jim Blandy | 1994-10-10 16:01:58 +0000 |
| commit | f0c5b7125ade68cf4e77069f51e47f63c1e07d17 (patch) | |
| tree | d67ed344ade93f605817d0052a6f8edb9295234b /src/buffer.c | |
| parent | 86af296ba1ea18617c4fc48efe275646289263a7 (diff) | |
| download | emacs-f0c5b7125ade68cf4e77069f51e47f63c1e07d17.tar.gz emacs-f0c5b7125ade68cf4e77069f51e47f63c1e07d17.zip | |
(syms_of_buffer): Doc fix for cache-long-line-scans.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/src/buffer.c b/src/buffer.c index 27c3f8f2e8a..8976eed74e6 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -2990,21 +2990,33 @@ If the value of the variable is t, undo information is not recorded."); | |||
| 2990 | Automatically local in all buffers."); | 2990 | Automatically local in all buffers."); |
| 2991 | 2991 | ||
| 2992 | DEFVAR_PER_BUFFER ("cache-long-line-scans", ¤t_buffer->cache_long_line_scans, Qnil, | 2992 | DEFVAR_PER_BUFFER ("cache-long-line-scans", ¤t_buffer->cache_long_line_scans, Qnil, |
| 2993 | "Non-nil means that Emacs should use caches to handle long lines faster.\n\ | 2993 | "Non-nil means that Emacs should use caches to handle long lines more quickly.\n\ |
| 2994 | This variable is buffer-local, in all buffers.\n\ | ||
| 2994 | \n\ | 2995 | \n\ |
| 2995 | Emacs moves from one line to the next by scanning the buffer for\n\ | 2996 | Normally, the line-motion functions work by scanning the buffer for\n\ |
| 2996 | newlines, and it implements columnar operations like move-to-column by\n\ | 2997 | newlines. Columnar operations (like move-to-column and\n\ |
| 2997 | scanning the buffer, adding character widths as it goes. If the\n\ | 2998 | compute-motion) also work by scanning the buffer, summing character\n\ |
| 2999 | widths as they go. This works well for ordinary text, but if the\n\ | ||
| 2998 | buffer's lines are very long (say, more than 500 characters), these\n\ | 3000 | buffer's lines are very long (say, more than 500 characters), these\n\ |
| 2999 | scans can slow Emacs down a great deal.\n\ | 3001 | motion functions will take longer to execute. Emacs may also take\n\ |
| 3002 | longer to update the display.\n\ | ||
| 3000 | \n\ | 3003 | \n\ |
| 3001 | If this variable is non-nil, Emacs caches the results of its scans,\n\ | 3004 | If cache-long-line-scans is non-nil, these motion functions cache the\n\ |
| 3002 | and avoids rescanning regions of the buffer until they are modified.\n\ | 3005 | results of their scans, and consult the cache to avoid rescanning\n\ |
| 3006 | regions of the buffer until the text is modified. The caches are most\n\ | ||
| 3007 | beneficial when they prevent the most searching---that is, when the\n\ | ||
| 3008 | buffer contains long lines and large regions of characters with the\n\ | ||
| 3009 | same, fixed screen width.\n\ | ||
| 3003 | \n\ | 3010 | \n\ |
| 3004 | If this variable is non-nil, short scans will become slightly slower,\n\ | 3011 | When cache-long-line-scans is non-nil, processing short lines will\n\ |
| 3005 | and the caches will use memory roughly proportional to the number of\n\ | 3012 | become slightly slower (because of the overhead of consulting the\n\ |
| 3006 | newlines and characters whose visual representation can occupy more than\n\ | 3013 | cache), and the caches will use memory roughly proportional to the\n\ |
| 3007 | one column."); | 3014 | number of newlines and characters whose screen width varies.\n\ |
| 3015 | \n\ | ||
| 3016 | The caches require no explicit maintenance; their accuracy is\n\ | ||
| 3017 | maintained internally by the Emacs primitives. Enabling or disabling\n\ | ||
| 3018 | the cache should not affect the behavior of any of the motion\n\ | ||
| 3019 | functions; it should only affect their performance."); | ||
| 3008 | 3020 | ||
| 3009 | DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode, | 3021 | DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode, |
| 3010 | "*Non-nil means deactivate the mark when the buffer contents change."); | 3022 | "*Non-nil means deactivate the mark when the buffer contents change."); |