Variable: auto-raise-mode-hook

auto-raise-mode-hook is a customizable variable defined in frame.el.gz.

Value

nil

Documentation

Hook run after entering or leaving auto-raise-mode.

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

Source Code

;; Defined in /usr/src/emacs/lisp/frame.el.gz
(define-minor-mode auto-raise-mode
  "Toggle whether or not selected frames should auto-raise.

Auto Raise mode does nothing under most window managers, which
switch focus on mouse clicks.  It only has an effect if your
window manager switches focus on mouse movement (in which case
you should also change `focus-follows-mouse' to t).  Then,
enabling Auto Raise mode causes any graphical Emacs frame which
acquires focus to be automatically raised.

Note that this minor mode controls Emacs's own auto-raise
feature.  Window managers that switch focus on mouse movement
often have their own auto-raise feature."
  ;; This isn't really a global minor mode; rather, it's local to the
  ;; selected frame, but declaring it as global prevents a misleading
  ;; "Auto-Raise mode enabled in current buffer" message from being
  ;; displayed when it is turned on.
  :global t
  :variable (frame-parameter nil 'auto-raise)
  (if (frame-parameter nil 'auto-raise)
      (raise-frame)))