Variable: focus-in-hook

focus-in-hook is a variable defined in frame.el.gz.

This variable is obsolete since 27.1; after-focus-change-function

Value

nil

Documentation

Normal hook run when a frame gains focus.

The frame gaining focus is selected at the time this hook is run.

This hook is obsolete. Despite its name, this hook may be run in situations other than when a frame obtains input focus: for example, we also run this hook when switching the selected frame internally to handle certain input events (like mouse wheel scrolling) even when the user's notion of input focus hasn't changed.

Prefer using after-focus-change-function.

Probably introduced at or before Emacs version 24.4.

Source Code

;; Defined in /usr/src/emacs/lisp/frame.el.gz
(defvar focus-in-hook nil
  "Normal hook run when a frame gains focus.
The frame gaining focus is selected at the time this hook is run.

This hook is obsolete.  Despite its name, this hook may be run in
situations other than when a frame obtains input focus: for
example, we also run this hook when switching the selected frame
internally to handle certain input events (like mouse wheel
scrolling) even when the user's notion of input focus
hasn't changed.

Prefer using `after-focus-change-function'.")