Function: auto-raise-mode
auto-raise-mode is an interactive and byte-compiled function defined
in frame.el.gz.
Signature
(auto-raise-mode &optional ARG)
Documentation
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 is a global minor mode. If called interactively, toggle the
Auto-Raise mode mode. If the prefix argument is positive,
enable the mode, and if it is zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable
the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate (frame-parameter nil \=auto-raise)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
Key Bindings
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)))