diff options
| author | Gregory Heytings | 2022-11-27 22:19:41 +0100 |
|---|---|---|
| committer | Gregory Heytings | 2022-11-27 22:19:41 +0100 |
| commit | 849223fba1ef899f90a6edff05bce24b90fbb043 (patch) | |
| tree | b5ab707f2da7d13ba2cb10c8af441547152c83ef /src/buffer.c | |
| parent | 89a10ffcc49c5832619649b7876cc339fa9d0dcf (diff) | |
| parent | 18fa159fa91b515f2281b83648961fdc5e21aca7 (diff) | |
| download | emacs-849223fba1ef899f90a6edff05bce24b90fbb043.tar.gz emacs-849223fba1ef899f90a6edff05bce24b90fbb043.zip | |
Merge branch 'feature/improved-locked-narrowing'
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c index ac7f4f8e9d4..71be7ed9e13 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5898,7 +5898,42 @@ this threshold. | |||
| 5898 | If nil, these display shortcuts will always remain disabled. | 5898 | If nil, these display shortcuts will always remain disabled. |
| 5899 | 5899 | ||
| 5900 | There is no reason to change that value except for debugging purposes. */); | 5900 | There is no reason to change that value except for debugging purposes. */); |
| 5901 | XSETFASTINT (Vlong_line_threshold, 10000); | 5901 | XSETFASTINT (Vlong_line_threshold, 50000); |
| 5902 | |||
| 5903 | DEFVAR_INT ("long-line-locked-narrowing-region-size", | ||
| 5904 | long_line_locked_narrowing_region_size, | ||
| 5905 | doc: /* Region size for locked narrowing in buffers with long lines. | ||
| 5906 | |||
| 5907 | This variable has effect only in buffers which contain one or more | ||
| 5908 | lines whose length is above `long-line-threshold', which see. For | ||
| 5909 | performance reasons, in such buffers, low-level hooks such as | ||
| 5910 | `fontification-functions' or `post-command-hook' are executed on a | ||
| 5911 | narrowed buffer, with a narrowing locked with `narrowing-lock'. This | ||
| 5912 | variable specifies the size of the narrowed region around point. | ||
| 5913 | |||
| 5914 | To disable that narrowing, set this variable to 0. | ||
| 5915 | |||
| 5916 | See also `long-line-locked-narrowing-bol-search-limit'. | ||
| 5917 | |||
| 5918 | There is no reason to change that value except for debugging purposes. */); | ||
| 5919 | long_line_locked_narrowing_region_size = 500000; | ||
| 5920 | |||
| 5921 | DEFVAR_INT ("long-line-locked-narrowing-bol-search-limit", | ||
| 5922 | long_line_locked_narrowing_bol_search_limit, | ||
| 5923 | doc: /* Limit for beginning of line search in buffers with long lines. | ||
| 5924 | |||
| 5925 | This variable has effect only in buffers which contain one or more | ||
| 5926 | lines whose length is above `long-line-threshold', which see. For | ||
| 5927 | performance reasons, in such buffers, low-level hooks such as | ||
| 5928 | `fontification-functions' or `post-command-hook' are executed on a | ||
| 5929 | narrowed buffer, with a narrowing locked with `narrowing-lock'. The | ||
| 5930 | variable `long-line-locked-narrowing-region-size' specifies the size | ||
| 5931 | of the narrowed region around point. This variable, which should be a | ||
| 5932 | small integer, specifies the number of characters by which that region | ||
| 5933 | can be extended backwards to make it start at the beginning of a line. | ||
| 5934 | |||
| 5935 | There is no reason to change that value except for debugging purposes. */); | ||
| 5936 | long_line_locked_narrowing_bol_search_limit = 128; | ||
| 5902 | 5937 | ||
| 5903 | DEFVAR_INT ("large-hscroll-threshold", large_hscroll_threshold, | 5938 | DEFVAR_INT ("large-hscroll-threshold", large_hscroll_threshold, |
| 5904 | doc: /* Horizontal scroll of truncated lines above which to use redisplay shortcuts. | 5939 | doc: /* Horizontal scroll of truncated lines above which to use redisplay shortcuts. |