diff options
| author | Gregory Heytings | 2023-02-09 01:09:10 +0000 |
|---|---|---|
| committer | Gregory Heytings | 2023-02-09 02:44:51 +0100 |
| commit | a6cd4553d48aff1d241d54d62dc1b39b3ff541e0 (patch) | |
| tree | 4a47008c3c1568c8539b7a352ca6cd172955196c /src | |
| parent | 0d73e4aa261d1d751a7469a6274b2e1b9fa210e6 (diff) | |
| download | emacs-a6cd4553d48aff1d241d54d62dc1b39b3ff541e0.tar.gz emacs-a6cd4553d48aff1d241d54d62dc1b39b3ff541e0.zip | |
Rename two long line optimizations variables
* src/buffer.c (syms_of_buffer): Rename two variables.
* src/xdisp.c (get_locked_narrowing_begv):
(get_locked_narrowing_zv):
(handle_fontified_prop): Use the new names.
* src/keyboard.c (safe_run_hooks_maybe_narrowed): Use the new
names.
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 12 | ||||
| -rw-r--r-- | src/keyboard.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 12 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/buffer.c b/src/buffer.c index 38648519ba0..07723a7c6ff 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5916,8 +5916,8 @@ If nil, these display shortcuts will always remain disabled. | |||
| 5916 | There is no reason to change that value except for debugging purposes. */); | 5916 | There is no reason to change that value except for debugging purposes. */); |
| 5917 | XSETFASTINT (Vlong_line_threshold, 50000); | 5917 | XSETFASTINT (Vlong_line_threshold, 50000); |
| 5918 | 5918 | ||
| 5919 | DEFVAR_INT ("long-line-locked-narrowing-region-size", | 5919 | DEFVAR_INT ("long-line-optimizations-region-size", |
| 5920 | long_line_locked_narrowing_region_size, | 5920 | long_line_optimizations_region_size, |
| 5921 | doc: /* Region size for locked narrowing in buffers with long lines. | 5921 | doc: /* Region size for locked narrowing in buffers with long lines. |
| 5922 | 5922 | ||
| 5923 | This variable has effect only in buffers which contain one or more | 5923 | This variable has effect only in buffers which contain one or more |
| @@ -5932,10 +5932,10 @@ To disable that narrowing, set this variable to 0. | |||
| 5932 | See also `long-line-locked-narrowing-bol-search-limit'. | 5932 | See also `long-line-locked-narrowing-bol-search-limit'. |
| 5933 | 5933 | ||
| 5934 | There is no reason to change that value except for debugging purposes. */); | 5934 | There is no reason to change that value except for debugging purposes. */); |
| 5935 | long_line_locked_narrowing_region_size = 500000; | 5935 | long_line_optimizations_region_size = 500000; |
| 5936 | 5936 | ||
| 5937 | DEFVAR_INT ("long-line-locked-narrowing-bol-search-limit", | 5937 | DEFVAR_INT ("long-line-optimizations-bol-search-limit", |
| 5938 | long_line_locked_narrowing_bol_search_limit, | 5938 | long_line_optimizations_bol_search_limit, |
| 5939 | doc: /* Limit for beginning of line search in buffers with long lines. | 5939 | doc: /* Limit for beginning of line search in buffers with long lines. |
| 5940 | 5940 | ||
| 5941 | This variable has effect only in buffers which contain one or more | 5941 | This variable has effect only in buffers which contain one or more |
| @@ -5949,7 +5949,7 @@ small integer, specifies the number of characters by which that region | |||
| 5949 | can be extended backwards to make it start at the beginning of a line. | 5949 | can be extended backwards to make it start at the beginning of a line. |
| 5950 | 5950 | ||
| 5951 | There is no reason to change that value except for debugging purposes. */); | 5951 | There is no reason to change that value except for debugging purposes. */); |
| 5952 | long_line_locked_narrowing_bol_search_limit = 128; | 5952 | long_line_optimizations_bol_search_limit = 128; |
| 5953 | 5953 | ||
| 5954 | DEFVAR_INT ("large-hscroll-threshold", large_hscroll_threshold, | 5954 | DEFVAR_INT ("large-hscroll-threshold", large_hscroll_threshold, |
| 5955 | doc: /* Horizontal scroll of truncated lines above which to use redisplay shortcuts. | 5955 | doc: /* Horizontal scroll of truncated lines above which to use redisplay shortcuts. |
diff --git a/src/keyboard.c b/src/keyboard.c index 243767aff53..4417aa97d28 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1910,7 +1910,7 @@ safe_run_hooks_maybe_narrowed (Lisp_Object hook, struct window *w) | |||
| 1910 | specbind (Qinhibit_quit, Qt); | 1910 | specbind (Qinhibit_quit, Qt); |
| 1911 | 1911 | ||
| 1912 | if (current_buffer->long_line_optimizations_p | 1912 | if (current_buffer->long_line_optimizations_p |
| 1913 | && long_line_locked_narrowing_region_size > 0) | 1913 | && long_line_optimizations_region_size > 0) |
| 1914 | { | 1914 | { |
| 1915 | ptrdiff_t begv = get_locked_narrowing_begv (PT); | 1915 | ptrdiff_t begv = get_locked_narrowing_begv (PT); |
| 1916 | ptrdiff_t zv = get_locked_narrowing_zv (PT); | 1916 | ptrdiff_t zv = get_locked_narrowing_zv (PT); |
diff --git a/src/xdisp.c b/src/xdisp.c index f777d2899b4..8034b20d5f8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3536,11 +3536,11 @@ get_closer_narrowed_begv (struct window *w, ptrdiff_t pos) | |||
| 3536 | ptrdiff_t | 3536 | ptrdiff_t |
| 3537 | get_locked_narrowing_begv (ptrdiff_t pos) | 3537 | get_locked_narrowing_begv (ptrdiff_t pos) |
| 3538 | { | 3538 | { |
| 3539 | if (long_line_locked_narrowing_region_size <= 0) | 3539 | if (long_line_optimizations_region_size <= 0) |
| 3540 | return BEGV; | 3540 | return BEGV; |
| 3541 | int len = long_line_locked_narrowing_region_size / 2; | 3541 | int len = long_line_optimizations_region_size / 2; |
| 3542 | int begv = max (pos - len, BEGV); | 3542 | int begv = max (pos - len, BEGV); |
| 3543 | int limit = long_line_locked_narrowing_bol_search_limit; | 3543 | int limit = long_line_optimizations_bol_search_limit; |
| 3544 | while (limit > 0) | 3544 | while (limit > 0) |
| 3545 | { | 3545 | { |
| 3546 | if (begv == BEGV || FETCH_BYTE (CHAR_TO_BYTE (begv) - 1) == '\n') | 3546 | if (begv == BEGV || FETCH_BYTE (CHAR_TO_BYTE (begv) - 1) == '\n') |
| @@ -3554,9 +3554,9 @@ get_locked_narrowing_begv (ptrdiff_t pos) | |||
| 3554 | ptrdiff_t | 3554 | ptrdiff_t |
| 3555 | get_locked_narrowing_zv (ptrdiff_t pos) | 3555 | get_locked_narrowing_zv (ptrdiff_t pos) |
| 3556 | { | 3556 | { |
| 3557 | if (long_line_locked_narrowing_region_size <= 0) | 3557 | if (long_line_optimizations_region_size <= 0) |
| 3558 | return ZV; | 3558 | return ZV; |
| 3559 | int len = long_line_locked_narrowing_region_size / 2; | 3559 | int len = long_line_optimizations_region_size / 2; |
| 3560 | return min (pos + len, ZV); | 3560 | return min (pos + len, ZV); |
| 3561 | } | 3561 | } |
| 3562 | 3562 | ||
| @@ -4394,7 +4394,7 @@ handle_fontified_prop (struct it *it) | |||
| 4394 | eassert (it->end_charpos == ZV); | 4394 | eassert (it->end_charpos == ZV); |
| 4395 | 4395 | ||
| 4396 | if (current_buffer->long_line_optimizations_p | 4396 | if (current_buffer->long_line_optimizations_p |
| 4397 | && long_line_locked_narrowing_region_size > 0) | 4397 | && long_line_optimizations_region_size > 0) |
| 4398 | { | 4398 | { |
| 4399 | ptrdiff_t begv = it->locked_narrowing_begv; | 4399 | ptrdiff_t begv = it->locked_narrowing_begv; |
| 4400 | ptrdiff_t zv = it->locked_narrowing_zv; | 4400 | ptrdiff_t zv = it->locked_narrowing_zv; |