diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2022-08-15 02:22:59 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2022-08-15 02:22:59 +0300 |
commit | ee3a674c7c9e39fe7ff296ce1f9830fc45520de8 (patch) | |
tree | e8ba1e7be54314f208454e80e3d31044c913f3eb /src/buffer.c | |
parent | fe0e53d963899a16e0dd1bbc1ba10a6b59f7989e (diff) | |
parent | 0a8e88fd83db5398d36064a7f87cff5b57da7284 (diff) | |
download | emacs-scratch/font_lock_large_files.tar.gz |
Merge branch 'master' into scratch/font_lock_large_filesscratch/font_lock_large_files
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c index e5601af5051..98066a2eb60 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1160,7 +1160,8 @@ is first appended to NAME, to speed up finding a non-existent buffer. */) genbase = name; else { - char number[sizeof "-999999"]; + enum { bug_52711 = true }; /* https://bugs.gnu.org/57211 */ + char number[bug_52711 ? INT_BUFSIZE_BOUND (int) + 1 : sizeof "-999999"]; EMACS_INT r = get_random (); eassume (0 <= r); int i = r % 1000000; @@ -6442,6 +6443,24 @@ If nil, these display shortcuts will always remain disabled. There is no reason to change that value except for debugging purposes. */); XSETFASTINT (Vlong_line_threshold, 10000); + DEFVAR_INT ("large-hscroll-threshold", large_hscroll_threshold, + doc: /* Horizontal scroll of truncated lines above which to use redisplay shortcuts. + +The value should be a positive integer. + +Shortcuts in the display code intended to speed up redisplay for long +and truncated lines will automatically be enabled when a line's +horizontal scroll amount is or about to become larger than the value +of this variable. + +This variable has effect only in buffers which contain one or more +lines whose length is above `long-line-threshold', which see. +To disable redisplay shortcuts for long truncated line, set this +variable to `most-positive-fixnum'. + +There is no reason to change that value except for debugging purposes. */); + large_hscroll_threshold = 10000; + defsubr (&Sbuffer_live_p); defsubr (&Sbuffer_list); defsubr (&Sget_buffer); |