]> git.eshelyaron.com Git - emacs.git/commitdiff
Clarify when activate-mark-hook is run
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 7 Feb 2021 21:01:34 +0000 (22:01 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 7 Feb 2021 21:01:39 +0000 (22:01 +0100)
* doc/lispref/markers.texi (The Mark):
* lisp/simple.el (activate-mark-hook): Clarify when the hook is
run (bug#23444).

doc/lispref/markers.texi
lisp/simple.el

index cdd0938b4584994bf7db739e0bdb3a0d608806a6..93f98190fa38c3f53d48c026cd928546a6b143cc 100644 (file)
@@ -607,8 +607,8 @@ the function @code{use-region-p} for that (@pxref{The Region}).
 @defvarx deactivate-mark-hook
 These normal hooks are run, respectively, when the mark becomes active
 and when it becomes inactive.  The hook @code{activate-mark-hook} is
-also run at the end of the command loop if the mark is active and it
-is possible that the region may have changed.
+also run when the region is reactivated, for instance after using a
+command that switches back to a buffer that has an active mark.
 @ignore
 This piece of command_loop_1, run unless deactivating the mark:
   if (current_buffer != prev_buffer || MODIFF != prev_modiff)
index 10cde4e4b89f1c6ec99699f02565996362db2c69..28738a262d35ccdcf11d21dde41a3c486dd9d697 100644 (file)
@@ -5536,8 +5536,9 @@ START and END specify the portion of the current buffer to be copied."
 
 (defvar activate-mark-hook nil
   "Hook run when the mark becomes active.
-It is also run at the end of a command, if the mark is active and
-it is possible that the region may have changed.")
+It is also run when the region is reactivated, for instance after
+using a command that switches back to a buffer that has an active
+mark.")
 
 (defvar deactivate-mark-hook nil
   "Hook run when the mark becomes inactive.")