diff options
| author | Gregory Heytings | 2022-08-21 21:25:32 +0000 |
|---|---|---|
| committer | Gregory Heytings | 2022-08-21 23:26:14 +0200 |
| commit | ea8e0f67bbb6eccf4c860348589d5d3abf8ade84 (patch) | |
| tree | 0b3f3698379ef06f8779872fe7b48d0a7a787865 /src | |
| parent | 2342fb052b276f8f5b0e00647a1150b3a9c51c66 (diff) | |
| download | emacs-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.c | 10 |
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 | ||
| 2689 | This allows the buffer's full text to be seen and edited, unless | 2689 | This allows the buffer's full text to be seen and edited, unless |
| 2690 | the restrictions have been locked with `narrowing-lock', which see, | 2690 | restrictions have been locked with `narrowing-lock', which see, in |
| 2691 | in which case the the restrictions that were current when | 2691 | which case the restrictions that were current when `narrowing-lock' |
| 2692 | `narrowing-lock' was called are restored. */) | 2692 | was 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 | ||
| 2787 | Locking restrictions should be used sparingly, after carefully | 2787 | Locking restrictions should be used sparingly, after carefully |
| 2788 | considering the potential adverse effects on the code that will be | 2788 | considering the potential adverse effects on the code that will be |
| 2789 | executed with locked restrictions. It is meant to be used around | 2789 | executed within locked restrictions. It is typically meant to be used |
| 2790 | portions of code that would become too slow, and make Emacs | 2790 | around portions of code that would become too slow, and make Emacs |
| 2791 | unresponsive, if they were executed in a large buffer. For example, | 2791 | unresponsive, if they were executed in a large buffer. For example, |
| 2792 | restrictions are locked by Emacs around low-level hooks such as | 2792 | restrictions are locked by Emacs around low-level hooks such as |
| 2793 | `fontification-functions' or `post-command-hook'. | 2793 | `fontification-functions' or `post-command-hook'. |