aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorGregory Heytings2023-02-13 11:44:37 +0100
committerGregory Heytings2023-02-13 11:44:37 +0100
commitb948d0d7efe4c73a34485238d6a4e1bb5f0cac9e (patch)
tree3c1fc837f7094c21d1d35f1e66c657020908ea7f /src/buffer.c
parentcc30422825a5acf460d026bfe912b327b70dedcf (diff)
parentdcb2379a463678bdadd05ee39d61e7da84c71c5e (diff)
downloademacs-b948d0d7efe4c73a34485238d6a4e1bb5f0cac9e.tar.gz
emacs-b948d0d7efe4c73a34485238d6a4e1bb5f0cac9e.zip
Merge branch 'scratch/fix-locked-narrowing'
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 38648519ba0..755061d0dee 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5916,40 +5916,41 @@ If nil, these display shortcuts will always remain disabled.
5916There is no reason to change that value except for debugging purposes. */); 5916There 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 narrowing in buffers with long lines.
5922 5922
5923This variable has effect only in buffers which contain one or more 5923This variable has effect only in buffers in which
5924lines whose length is above `long-line-threshold', which see. For 5924`long-line-optimizations-p' is non-nil. For performance reasons, in
5925performance reasons, in such buffers, low-level hooks such as 5925such buffers, the `fontification-functions', `pre-command-hook' and
5926`fontification-functions' or `post-command-hook' are executed on a 5926`post-command-hook' hooks are executed on a narrowed buffer around
5927narrowed buffer, with a narrowing locked with `narrowing-lock'. This 5927point, as if they were called in a `with-narrowing' form with a label.
5928variable specifies the size of the narrowed region around point. 5928This variable specifies the size of the narrowed region around point.
5929 5929
5930To disable that narrowing, set this variable to 0. 5930To disable that narrowing, set this variable to 0.
5931 5931
5932See also `long-line-locked-narrowing-bol-search-limit'. 5932See also `long-line-optimizations-bol-search-limit'.
5933 5933
5934There is no reason to change that value except for debugging purposes. */); 5934There 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
5941This variable has effect only in buffers which contain one or more 5941This variable has effect only in buffers in which
5942lines whose length is above `long-line-threshold', which see. For 5942`long-line-optimizations-p' is non-nil. For performance reasons, in
5943performance reasons, in such buffers, low-level hooks such as 5943such buffers, the `fontification-functions', `pre-command-hook' and
5944`fontification-functions' or `post-command-hook' are executed on a 5944`post-command-hook' hooks are executed on a narrowed buffer around
5945narrowed buffer, with a narrowing locked with `narrowing-lock'. The 5945point, as if they were called in a `with-narrowing' form with a label.
5946variable `long-line-locked-narrowing-region-size' specifies the size 5946The variable `long-line-optimizations-region-size' specifies the
5947of the narrowed region around point. This variable, which should be a 5947size of the narrowed region around point. This variable, which should
5948small integer, specifies the number of characters by which that region 5948be a small integer, specifies the number of characters by which that
5949can be extended backwards to make it start at the beginning of a line. 5949region can be extended backwards to make it start at the beginning of
5950a line.
5950 5951
5951There is no reason to change that value except for debugging purposes. */); 5952There is no reason to change that value except for debugging purposes. */);
5952 long_line_locked_narrowing_bol_search_limit = 128; 5953 long_line_optimizations_bol_search_limit = 128;
5953 5954
5954 DEFVAR_INT ("large-hscroll-threshold", large_hscroll_threshold, 5955 DEFVAR_INT ("large-hscroll-threshold", large_hscroll_threshold,
5955 doc: /* Horizontal scroll of truncated lines above which to use redisplay shortcuts. 5956 doc: /* Horizontal scroll of truncated lines above which to use redisplay shortcuts.