Remove misleading "in current buffer" message from auto-raise-mode
authorPo Lu <luangruo@yahoo.com>
Fri, 4 Feb 2022 13:22:03 +0000 (21:22 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 4 Feb 2022 13:24:41 +0000 (21:24 +0800)
* lisp/frame.el (auto-raise-mode): Declare as global to prevent
a misleading message from being displayed.  It's actually
frame-local, but declaring it global doesn't hurt since
`frame-parameter' is a gv.

lisp/frame.el

index d39597d0aff0ef23ade6c2b54c8b5c95c84dc297..6bf4c6178b10749bc0bf975a5bb668ce1ff0d21c 100644 (file)
@@ -1590,6 +1590,11 @@ 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)))