From: Lars Ingebrigtsen Date: Mon, 19 Jul 2021 14:41:54 +0000 (+0200) Subject: Fix documentation of mouse-leave-buffer-hook X-Git-Tag: emacs-28.0.90~1809 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3094c12c45a60203052fc1fac1b793b982cdd787;p=emacs.git Fix documentation of mouse-leave-buffer-hook * doc/lispref/hooks.texi (Standard Hooks): Ditto. * src/callint.c (syms_of_callint): Document the actual usage of `mouse-leave-buffer-hook' (bug#2932). --- diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index b1c7e613719..394928454b0 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -184,7 +184,7 @@ The command loop runs this soon after @code{post-command-hook} (q.v.). @item mouse-leave-buffer-hook @vindex mouse-leave-buffer-hook -Hook run when about to switch windows with a mouse command. +Hook run when the user mouse-clicks in a window. @item mouse-position-function @xref{Mouse Position}. diff --git a/src/callint.c b/src/callint.c index 18624637843..a196210250d 100644 --- a/src/callint.c +++ b/src/callint.c @@ -892,7 +892,10 @@ behave as if the mark were still active. */); Vmark_even_if_inactive = Qt; DEFVAR_LISP ("mouse-leave-buffer-hook", Vmouse_leave_buffer_hook, - doc: /* Hook to run when about to switch windows with a mouse command. + doc: /* Hook run when the user mouse-clicks in a window. +It can be run both before and after switching windows, or even when +when not actually switching windows. + Its purpose is to give temporary modes such as Isearch mode a way to turn themselves off when a mouse command switches windows. */); Vmouse_leave_buffer_hook = Qnil;