emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/fix-locked-narrowing a6cd4553d4 5/7: Rename two long line optimi


From: Gregory Heytings
Subject: scratch/fix-locked-narrowing a6cd4553d4 5/7: Rename two long line optimizations variables
Date: Wed, 8 Feb 2023 20:49:29 -0500 (EST)

branch: scratch/fix-locked-narrowing
commit a6cd4553d48aff1d241d54d62dc1b39b3ff541e0
Author: Gregory Heytings <gregory@heytings.org>
Commit: Gregory Heytings <gregory@heytings.org>

    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.
---
 src/buffer.c   | 12 ++++++------
 src/keyboard.c |  2 +-
 src/xdisp.c    | 12 ++++++------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/buffer.c b/src/buffer.c
index 38648519ba..07723a7c6f 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5916,8 +5916,8 @@ 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, 50000);
 
-  DEFVAR_INT ("long-line-locked-narrowing-region-size",
-             long_line_locked_narrowing_region_size,
+  DEFVAR_INT ("long-line-optimizations-region-size",
+             long_line_optimizations_region_size,
              doc: /* Region size for locked narrowing in buffers with long 
lines.
 
 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.
 See also `long-line-locked-narrowing-bol-search-limit'.
 
 There is no reason to change that value except for debugging purposes.  */);
-  long_line_locked_narrowing_region_size = 500000;
+  long_line_optimizations_region_size = 500000;
 
-  DEFVAR_INT ("long-line-locked-narrowing-bol-search-limit",
-             long_line_locked_narrowing_bol_search_limit,
+  DEFVAR_INT ("long-line-optimizations-bol-search-limit",
+             long_line_optimizations_bol_search_limit,
              doc: /* Limit for beginning of line search in buffers with long 
lines.
 
 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
 can be extended backwards to make it start at the beginning of a line.
 
 There is no reason to change that value except for debugging purposes.  */);
-  long_line_locked_narrowing_bol_search_limit = 128;
+  long_line_optimizations_bol_search_limit = 128;
 
   DEFVAR_INT ("large-hscroll-threshold", large_hscroll_threshold,
     doc: /* Horizontal scroll of truncated lines above which to use redisplay 
shortcuts.
diff --git a/src/keyboard.c b/src/keyboard.c
index 243767aff5..4417aa97d2 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1910,7 +1910,7 @@ safe_run_hooks_maybe_narrowed (Lisp_Object hook, struct 
window *w)
   specbind (Qinhibit_quit, Qt);
 
   if (current_buffer->long_line_optimizations_p
-      && long_line_locked_narrowing_region_size > 0)
+      && long_line_optimizations_region_size > 0)
     {
       ptrdiff_t begv = get_locked_narrowing_begv (PT);
       ptrdiff_t zv = get_locked_narrowing_zv (PT);
diff --git a/src/xdisp.c b/src/xdisp.c
index f777d2899b..8034b20d5f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3536,11 +3536,11 @@ get_closer_narrowed_begv (struct window *w, ptrdiff_t 
pos)
 ptrdiff_t
 get_locked_narrowing_begv (ptrdiff_t pos)
 {
-  if (long_line_locked_narrowing_region_size <= 0)
+  if (long_line_optimizations_region_size <= 0)
     return BEGV;
-  int len = long_line_locked_narrowing_region_size / 2;
+  int len = long_line_optimizations_region_size / 2;
   int begv = max (pos - len, BEGV);
-  int limit = long_line_locked_narrowing_bol_search_limit;
+  int limit = long_line_optimizations_bol_search_limit;
   while (limit > 0)
     {
       if (begv == BEGV || FETCH_BYTE (CHAR_TO_BYTE (begv) - 1) == '\n')
@@ -3554,9 +3554,9 @@ get_locked_narrowing_begv (ptrdiff_t pos)
 ptrdiff_t
 get_locked_narrowing_zv (ptrdiff_t pos)
 {
-  if (long_line_locked_narrowing_region_size <= 0)
+  if (long_line_optimizations_region_size <= 0)
     return ZV;
-  int len = long_line_locked_narrowing_region_size / 2;
+  int len = long_line_optimizations_region_size / 2;
   return min (pos + len, ZV);
 }
 
@@ -4394,7 +4394,7 @@ handle_fontified_prop (struct it *it)
       eassert (it->end_charpos == ZV);
 
       if (current_buffer->long_line_optimizations_p
-         && long_line_locked_narrowing_region_size > 0)
+         && long_line_optimizations_region_size > 0)
        {
          ptrdiff_t begv = it->locked_narrowing_begv;
          ptrdiff_t zv = it->locked_narrowing_zv;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]