diff options
| author | Eli Zaretskii | 2016-08-10 20:12:55 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-08-10 20:12:55 +0300 |
| commit | ccd0e92ecccba35d9a59ddf75b269d9eaa504e94 (patch) | |
| tree | 62ff44bec4b80d7e11ff2a322e618eef543d5944 | |
| parent | f785ff45d56b40f744a3d7138231d23dfd35dda4 (diff) | |
| download | emacs-ccd0e92ecccba35d9a59ddf75b269d9eaa504e94.tar.gz emacs-ccd0e92ecccba35d9a59ddf75b269d9eaa504e94.zip | |
* doc/lispref/text.texi (Change Hooks): Minor copyedits.
| -rw-r--r-- | doc/lispref/text.texi | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index de0b00758a5..8b4810f4a60 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -4687,18 +4687,20 @@ will interfere in bizarre ways with the editing operations that call | |||
| 4687 | them. | 4687 | them. |
| 4688 | 4688 | ||
| 4689 | @defvar before-change-functions | 4689 | @defvar before-change-functions |
| 4690 | This variable holds a list of functions to call before most buffer | 4690 | This variable holds a list of functions to call when Emacs is about to |
| 4691 | modifications. Each function gets two arguments, the beginning and end | 4691 | modify a buffer. Each function gets two arguments, the beginning and |
| 4692 | of the region that is about to change, represented as integers. The | 4692 | end of the region that is about to change, represented as integers. |
| 4693 | buffer that is about to change is always the current buffer. | 4693 | The buffer that is about to change is always the current buffer when |
| 4694 | the function is called. | ||
| 4694 | @end defvar | 4695 | @end defvar |
| 4695 | 4696 | ||
| 4696 | @defvar after-change-functions | 4697 | @defvar after-change-functions |
| 4697 | This variable holds a list of functions to call after any buffer | 4698 | This variable holds a list of functions to call after Emacs modifies a |
| 4698 | modification. Each function receives three arguments: the beginning | 4699 | buffer. Each function receives three arguments: the beginning and end |
| 4699 | and end of the region just changed, and the length of the text that | 4700 | of the region just changed, and the length of the text that existed |
| 4700 | existed before the change. All three arguments are integers. The | 4701 | before the change. All three arguments are integers. The buffer that |
| 4701 | buffer that has been changed is always the current buffer. | 4702 | has been changed is always the current buffer when the function is |
| 4703 | called. | ||
| 4702 | 4704 | ||
| 4703 | The length of the old text is the difference between the buffer | 4705 | The length of the old text is the difference between the buffer |
| 4704 | positions before and after that text as it was before the change. As | 4706 | positions before and after that text as it was before the change. As |
| @@ -4712,9 +4714,13 @@ as changes in buffers created by Emacs internally for certain jobs, | |||
| 4712 | that should not be visible to Lisp programs. | 4714 | that should not be visible to Lisp programs. |
| 4713 | 4715 | ||
| 4714 | Do @emph{not} expect the before-change hooks and the after-change | 4716 | Do @emph{not} expect the before-change hooks and the after-change |
| 4715 | hooks be called in balanced pairs around each buffer change. These | 4717 | hooks be called in balanced pairs around each buffer change. Also |
| 4716 | hooks are provided on the assumption that Lisp programs will use | 4718 | don't expect the before-change hooks to be called for every chunk of |
| 4717 | either before- or the after-change hooks, but not both. | 4719 | text Emacs is about to delete. These hooks are provided on the |
| 4720 | assumption that Lisp programs will use either before- or the | ||
| 4721 | after-change hooks, but not both, and the boundaries of the region | ||
| 4722 | where the changes happen might include more than just the actual | ||
| 4723 | changed text, or even lump together several changes done piecemeal. | ||
| 4718 | 4724 | ||
| 4719 | @defmac combine-after-change-calls body@dots{} | 4725 | @defmac combine-after-change-calls body@dots{} |
| 4720 | The macro executes @var{body} normally, but arranges to call the | 4726 | The macro executes @var{body} normally, but arranges to call the |