aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGregory Heytings2022-08-21 21:25:32 +0000
committerGregory Heytings2022-08-21 23:26:14 +0200
commitea8e0f67bbb6eccf4c860348589d5d3abf8ade84 (patch)
tree0b3f3698379ef06f8779872fe7b48d0a7a787865 /src
parent2342fb052b276f8f5b0e00647a1150b3a9c51c66 (diff)
downloademacs-ea8e0f67bbb6eccf4c860348589d5d3abf8ade84.tar.gz
emacs-ea8e0f67bbb6eccf4c860348589d5d3abf8ade84.zip
Minor improvements to locked narrowing.
* lisp/subr.el (with-locked-narrowing): Add 'save-restriction' around the macro body. Update docstring. * src/editfns.c (Fwiden, Fnarrowing_lock): Docstring improvements.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 3389be67573..d7a62d914b8 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2687,9 +2687,9 @@ DEFUN ("widen", Fwiden, Swiden, 0, 0, "",
2687 doc: /* Remove restrictions (narrowing) from current buffer. 2687 doc: /* Remove restrictions (narrowing) from current buffer.
2688 2688
2689This allows the buffer's full text to be seen and edited, unless 2689This allows the buffer's full text to be seen and edited, unless
2690the restrictions have been locked with `narrowing-lock', which see, 2690restrictions have been locked with `narrowing-lock', which see, in
2691in which case the the restrictions that were current when 2691which case the restrictions that were current when `narrowing-lock'
2692`narrowing-lock' was called are restored. */) 2692was called are restored. */)
2693 (void) 2693 (void)
2694{ 2694{
2695 Fset (Qoutermost_narrowing, Qnil); 2695 Fset (Qoutermost_narrowing, Qnil);
@@ -2786,8 +2786,8 @@ used only within the limits of the restrictions that were current when
2786 2786
2787Locking restrictions should be used sparingly, after carefully 2787Locking restrictions should be used sparingly, after carefully
2788considering the potential adverse effects on the code that will be 2788considering the potential adverse effects on the code that will be
2789executed with locked restrictions. It is meant to be used around 2789executed within locked restrictions. It is typically meant to be used
2790portions of code that would become too slow, and make Emacs 2790around portions of code that would become too slow, and make Emacs
2791unresponsive, if they were executed in a large buffer. For example, 2791unresponsive, if they were executed in a large buffer. For example,
2792restrictions are locked by Emacs around low-level hooks such as 2792restrictions are locked by Emacs around low-level hooks such as
2793`fontification-functions' or `post-command-hook'. 2793`fontification-functions' or `post-command-hook'.