[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. */
- branch scratch/fix-locked-narrowing created (now 2956e54b1d), Gregory Heytings, 2023/02/08
- scratch/fix-locked-narrowing a4aa32bdff 1/7: Fix 'save-restriction' for narrowing locks, Gregory Heytings, 2023/02/08
- scratch/fix-locked-narrowing 0d73e4aa26 4/7: Add specific symbols for narrowings,
Gregory Heytings <=
- scratch/fix-locked-narrowing d8438e2bb4 3/7: Add 'without-narrowing' macro, Gregory Heytings, 2023/02/08
- scratch/fix-locked-narrowing 97314447e6 2/7: Make 'narrowing-lock' and 'narrowing-unlock' internal, Gregory Heytings, 2023/02/08
- scratch/fix-locked-narrowing 2956e54b1d 7/7: Add an extensive test for labeled (locked) narrowing, Gregory Heytings, 2023/02/08
- scratch/fix-locked-narrowing a6cd4553d4 5/7: Rename two long line optimizations variables, Gregory Heytings, 2023/02/08
- scratch/fix-locked-narrowing 79ce185ad1 6/7: Update the documentation about labeled (locked) narrowing, Gregory Heytings, 2023/02/08