diff options
| author | Lars Ingebrigtsen | 2021-02-07 22:01:34 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-02-07 22:01:39 +0100 |
| commit | 4712c75ab853ee77587dbc1910cc7c0401e02aa0 (patch) | |
| tree | cfc9393cbcbaa3e730699cc8f0744ee69fa3a8ba | |
| parent | abedf3a8653829f5170ff72b2fc7adad0e6f80d4 (diff) | |
| download | emacs-4712c75ab853ee77587dbc1910cc7c0401e02aa0.tar.gz emacs-4712c75ab853ee77587dbc1910cc7c0401e02aa0.zip | |
Clarify when activate-mark-hook is run
* doc/lispref/markers.texi (The Mark):
* lisp/simple.el (activate-mark-hook): Clarify when the hook is
run (bug#23444).
| -rw-r--r-- | doc/lispref/markers.texi | 4 | ||||
| -rw-r--r-- | lisp/simple.el | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi index cdd0938b458..93f98190fa3 100644 --- a/doc/lispref/markers.texi +++ b/doc/lispref/markers.texi | |||
| @@ -607,8 +607,8 @@ the function @code{use-region-p} for that (@pxref{The Region}). | |||
| 607 | @defvarx deactivate-mark-hook | 607 | @defvarx deactivate-mark-hook |
| 608 | These normal hooks are run, respectively, when the mark becomes active | 608 | These normal hooks are run, respectively, when the mark becomes active |
| 609 | and when it becomes inactive. The hook @code{activate-mark-hook} is | 609 | and when it becomes inactive. The hook @code{activate-mark-hook} is |
| 610 | also run at the end of the command loop if the mark is active and it | 610 | also run when the region is reactivated, for instance after using a |
| 611 | is possible that the region may have changed. | 611 | command that switches back to a buffer that has an active mark. |
| 612 | @ignore | 612 | @ignore |
| 613 | This piece of command_loop_1, run unless deactivating the mark: | 613 | This piece of command_loop_1, run unless deactivating the mark: |
| 614 | if (current_buffer != prev_buffer || MODIFF != prev_modiff) | 614 | if (current_buffer != prev_buffer || MODIFF != prev_modiff) |
diff --git a/lisp/simple.el b/lisp/simple.el index 10cde4e4b89..28738a262d3 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -5536,8 +5536,9 @@ START and END specify the portion of the current buffer to be copied." | |||
| 5536 | 5536 | ||
| 5537 | (defvar activate-mark-hook nil | 5537 | (defvar activate-mark-hook nil |
| 5538 | "Hook run when the mark becomes active. | 5538 | "Hook run when the mark becomes active. |
| 5539 | It is also run at the end of a command, if the mark is active and | 5539 | It is also run when the region is reactivated, for instance after |
| 5540 | it is possible that the region may have changed.") | 5540 | using a command that switches back to a buffer that has an active |
| 5541 | mark.") | ||
| 5541 | 5542 | ||
| 5542 | (defvar deactivate-mark-hook nil | 5543 | (defvar deactivate-mark-hook nil |
| 5543 | "Hook run when the mark becomes inactive.") | 5544 | "Hook run when the mark becomes inactive.") |