diff options
| author | Gregory Heytings | 2022-07-28 20:37:49 +0000 |
|---|---|---|
| committer | Gregory Heytings | 2022-07-28 22:40:42 +0200 |
| commit | d3c4833d1350e26a2ae35e00eaf2d6bef1724679 (patch) | |
| tree | 3d062ac14705af5ae72a0647f334674b69fadb97 /src/process.c | |
| parent | 2bab0f2db6fff3a99d3bc498d6139ee42aab96ea (diff) | |
| download | emacs-d3c4833d1350e26a2ae35e00eaf2d6bef1724679.tar.gz emacs-d3c4833d1350e26a2ae35e00eaf2d6bef1724679.zip | |
Add an optional 'lock' parameter to 'narrow-to-region'
* src/editfns.c (Fnarrow_to_region): Add the parameter to the
function, and handle it. Update docstring.
(unwind_locked_begv, unwind_locked_zv): New functions.
(Fwiden): Do nothing when restrictions are locked. Update
docstring.
(syms_of_editfns): Replace the 'inhibit-widen' symbol and variable
with a 'restrictions-locked' symbol and variable. Update docstring.
* src/xdisp.c (handle_fontified_prop): Use Fnarrow_to_region with
the new parameter.
(unwind_narrowed_zv): Remove function.
* src/process.c (Finternal_default_process_filter): Add a third
argument to Fnarrow_to_region.
* src/lread.c (readevalloop): Add a third argument to
Fnarrow_to_region.
* src/bytecode.c (exec_byte_code): Add a third argument to
Fnarrow_to_region.
* etc/NEWS (like): Mention the new parameter of 'narrow-to-region'.
* doc/lispref/positions.texi (Narrowing): Document it.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c index d6d51b26e11..444265a1bcb 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -6329,7 +6329,7 @@ Otherwise it discards the output. */) | |||
| 6329 | 6329 | ||
| 6330 | /* If the restriction isn't what it should be, set it. */ | 6330 | /* If the restriction isn't what it should be, set it. */ |
| 6331 | if (old_begv != BEGV || old_zv != ZV) | 6331 | if (old_begv != BEGV || old_zv != ZV) |
| 6332 | Fnarrow_to_region (make_fixnum (old_begv), make_fixnum (old_zv)); | 6332 | Fnarrow_to_region (make_fixnum (old_begv), make_fixnum (old_zv), Qnil); |
| 6333 | 6333 | ||
| 6334 | bset_read_only (current_buffer, old_read_only); | 6334 | bset_read_only (current_buffer, old_read_only); |
| 6335 | SET_PT_BOTH (opoint, opoint_byte); | 6335 | SET_PT_BOTH (opoint, opoint_byte); |