emacs-diffs
[Top][All Lists]
Advanced

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

scratch/fix-locked-narrowing 0d73e4aa26 4/7: Add specific symbols for na


From: Gregory Heytings
Subject: scratch/fix-locked-narrowing 0d73e4aa26 4/7: Add specific symbols for narrowings
Date: Wed, 8 Feb 2023 20:49:29 -0500 (EST)

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

    Add specific symbols for narrowings
    
    * src/xdisp.c (syms_of_xdisp): Define symbol.
    (handle_fontified_prop): Use it.
    
    * src/keyboard.c (syms_of_keyboard): Define symbol.
    (safe_run_hooks_maybe_narrowed): Use it.
---
 src/keyboard.c | 5 ++++-
 src/xdisp.c    | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/keyboard.c b/src/keyboard.c
index 6f0f075e54..243767aff5 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1915,7 +1915,8 @@ safe_run_hooks_maybe_narrowed (Lisp_Object hook, struct 
window *w)
       ptrdiff_t begv = get_locked_narrowing_begv (PT);
       ptrdiff_t zv = get_locked_narrowing_zv (PT);
       if (begv != BEG || zv != Z)
-       narrow_to_region_locked (make_fixnum (begv), make_fixnum (zv), hook);
+       narrow_to_region_locked (make_fixnum (begv), make_fixnum (zv),
+                                Qlong_line_optimizations_in_command_hooks);
     }
 
   run_hook_with_args (2, ((Lisp_Object []) {hook, hook}),
@@ -12168,6 +12169,8 @@ syms_of_keyboard (void)
   /* Hooks to run before and after each command.  */
   DEFSYM (Qpre_command_hook, "pre-command-hook");
   DEFSYM (Qpost_command_hook, "post-command-hook");
+  DEFSYM (Qlong_line_optimizations_in_command_hooks,
+         "long-line-optimizations-in-command-hooks");
 
   /* Hook run after the region is selected.  */
   DEFSYM (Qpost_select_region_hook, "post-select-region-hook");
diff --git a/src/xdisp.c b/src/xdisp.c
index a19c990861..f777d2899b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4406,7 +4406,7 @@ handle_fontified_prop (struct it *it)
            }
          if (begv != BEG || zv != Z)
            narrow_to_region_locked (make_fixnum (begv), make_fixnum (zv),
-                                    Qfontification_functions);
+                                    
Qlong_line_optimizations_in_fontification_functions);
        }
 
       /* Don't allow Lisp that runs from 'fontification-functions'
@@ -36266,6 +36266,8 @@ be let-bound around code that needs to disable messages 
temporarily. */);
   DEFSYM (QCfile, ":file");
   DEFSYM (Qfontified, "fontified");
   DEFSYM (Qfontification_functions, "fontification-functions");
+  DEFSYM (Qlong_line_optimizations_in_fontification_functions,
+         "long-line-optimizations-in-fontification-functions");
 
   /* Name of the symbol which disables Lisp evaluation in 'display'
      properties.  This is used by enriched.el.  */



reply via email to

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