diff options
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 509ce51b55e..a777668e44b 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -984,6 +984,7 @@ reset_buffer (register struct buffer *b) /* It is more conservative to start out "changed" than "unchanged". */ b->clip_changed = 0; b->prevent_redisplay_optimizations_p = 1; + b->long_line_optimizations_p = 0; bset_backed_up (b, Qnil); bset_local_minor_modes (b, Qnil); BUF_AUTOSAVE_MODIFF (b) = 0; @@ -2445,6 +2446,7 @@ results, see Info node `(elisp)Swapping Text'. */) swapfield (bidi_paragraph_cache, struct region_cache *); current_buffer->prevent_redisplay_optimizations_p = 1; other_buffer->prevent_redisplay_optimizations_p = 1; + swapfield (long_line_optimizations_p, bool_bf); swapfield (overlays_before, struct Lisp_Overlay *); swapfield (overlays_after, struct Lisp_Overlay *); swapfield (overlay_center, ptrdiff_t); @@ -6423,6 +6425,14 @@ Since `clone-indirect-buffer' calls `make-indirect-buffer', this hook will run for `clone-indirect-buffer' calls as well. */); Vclone_indirect_buffer_hook = Qnil; + DEFVAR_LISP ("long-line-threshold", Vlong_line_threshold, + doc: /* Line length above which specific display optimizations are used. +Display optimizations for long lines will automatically be enabled in +buffers which contain one or more lines whose length is above that +threshold. +When nil, these display optimizations are disabled. */); + XSETFASTINT (Vlong_line_threshold, 10000); + defsubr (&Sbuffer_live_p); defsubr (&Sbuffer_list); defsubr (&Sget_buffer); |