@item Tab Bar
@cindex internal tab bar
The tab bar (@pxref{Tab Bars,,,emacs, The GNU Emacs Manual}) is always
-drawn by Emacs itself. On builds with internal tool bars, the tab bar
-appears above the tool bar, on builds with external tool bars below.
+drawn by Emacs itself. The tab bar appears above the tool bar in
+Emacs built with an internal tool bar, and below the tool bar in
+builds with an external tool bar.
Display of the tab bar can be suppressed by setting the
@code{tab-bar-lines} parameter (@pxref{Layout Parameters}) to zero.
Note that this option does not distinguish ``sloppy'' focus (where the
frame that previously had focus retains focus as long as the mouse
-pointer does not move into another window system window) from ``strict''
+pointer does not move into another window-system window) from ``strict''
focus (where a frame immediately loses focus when it's left by the mouse
pointer). Neither does it recognize whether your window manager
supports delayed focusing or auto-raising where you can explicitly
@cindex terminal screen
@cindex screen of terminal
-@cindex window system window
+@cindex window-system window
Emacs uses the term ``window'' with a different meaning than in
graphical desktop environments and window systems, such as the X Window
System. When Emacs is run on X, each graphical X window owned by the
Emacs process corresponds to one Emacs frame. When Emacs is run on a
text terminal, each Emacs frame fills the entire terminal screen. In
either case, the frame may contain one or more Emacs windows. For
-disambiguation, we use the term @dfn{window system window} when we mean
-the window system window corresponding to an Emacs frame.
+disambiguation, we use the term @dfn{window-system window} when we mean
+the window-system window corresponding to an Emacs frame.
@cindex tiled windows
Unlike X windows, Emacs windows are @dfn{tiled}; they never overlap
windows on the same frame, so that the total area of the frame is
unchanged.
-In Emacs Lisp, windows are represented by a special Lisp object type.
+In Emacs Lisp, windows are represented by a special Lisp object type
+(@pxref{Window Type}).
@defun windowp object
This function returns @code{t} if @var{object} is a window (whether or
Each window belongs to exactly one frame (@pxref{Frames}). For all
windows belonging to a specific frame, we sometimes also say that these
-windows are owned by that frame or simply that they are on that frame.
+windows are @dfn{owned} by that frame or simply that they are on that frame.
@defun window-frame &optional window
This function returns the specified @var{window}'s frame---the frame
whose leaf nodes are the live windows. The internal nodes of a window
tree are not live; they exist for the purpose of organizing the
relationships between live windows. The root node of a window tree is
-called the @dfn{root window}. It is either a live window (if the frame
-has just one window besides the minibuffer window or the frame is a
-minibuffer-only frame, see @ref{Frame Layout}), or an internal window.
+called the @dfn{root window}. It is either a live window or an
+internal window. If it is a live window, then the frame has just one
+window besides the minibuffer window, or the frame is a
+minibuffer-only frame, @pxref{Frame Layout}.
A minibuffer window (@pxref{Minibuffer Windows}) that is not alone on
its frame does not have a parent window, so it strictly speaking is not
part of its frame's window tree. Nonetheless, it is a sibling window of
-the frame's root window, and thus can be reached from there via
+the frame's root window, and thus can be reached from the root window via
@code{window-next-sibling}, see below. Also, the function
@code{window-tree} described at the end of this section lists the
minibuffer window alongside the actual window tree.
windows} of a single internal window. If necessary, Emacs automatically
creates this internal window, which is also called the @dfn{parent
window}, and assigns it to the appropriate position in the window tree.
-A set of windows that share the same parent are called @dfn{siblings}.
+The set of windows that share the same parent are called @dfn{siblings}.
@cindex parent window
@defun window-parent &optional window
@defun select-window window &optional norecord
This function makes @var{window} the selected window and the window
-selected within its frame and selects that frame. It also makes
+selected within its frame, and selects that frame. It also makes
@var{window}'s buffer (@pxref{Buffers and Windows}) current and sets
that buffer's value of @code{point} to the value of @code{window-point}
(@pxref{Window Point}) in @var{window}. @var{window} must be a live
next time. If @var{norecord} is non-@code{nil}, such updates are
usually not performed. If, however, @var{norecord} equals the special
symbol @code{mark-for-redisplay}, the additional actions mentioned above
-are omitted but @var{window} will be nevertheless updated.
+are omitted but @var{window}'s display will be nevertheless updated.
Note that sometimes selecting a window is not enough to show it, or
make its frame the top-most frame on display: you may also need to
It is often useful to consider such a @dfn{window group} as a single
entity. Several functions such as @code{window-group-start}
(@pxref{Window Start and End}) allow you to do this by supplying, as
-an argument, one of the windows as a stand in for the whole group.
+an argument, one of the windows as a stand-in for the whole group.
@defun selected-window-group
@vindex selected-window-group-function
"Template for displaying tab bar items.
Every item in the list is a function that returns
a string, or a list of menu-item elements, or nil.
-When you add more items `tab-bar-format-align-right' and
-`tab-bar-format-global' to the end, then after enabling
-`display-time-mode' (or any other mode that uses `global-mode-string')
-it will display time aligned to the right on the tab bar instead of
-the mode line. Replacing `tab-bar-format-tabs' with
+Adding a function to the list causes the tab bar to show
+that string, or display a menu with those menu items when
+you click on the tab bar.
+If the list ends with `tab-bar-format-align-right' and
+`tab-bar-format-global', then after enabling `display-time-mode'
+(or any other mode that uses `global-mode-string'),
+it will display time aligned to the right on the tab bar instead
+of the mode line. Replacing `tab-bar-format-tabs' with
`tab-bar-format-tabs-groups' will group tabs on the tab bar."
:type 'hook
:options '(tab-bar-format-menu-global
:version "28.1")
(defun tab-bar-format-menu-global ()
- "Show global menu on clicking the Menu button."
+ "Produce the Menu button for the tab bar that shows a global menu."
`((add-tab menu-item (propertize "Menu" 'face 'tab-bar-tab-inactive)
(lambda (event) (interactive "e")
(let ((menu (make-sparse-keymap
:help "Global Menu")))
(defun tab-bar-format-history ()
- "Show back and forward buttons when `tab-bar-history-mode' is enabled.
+ "Produce back and forward buttons for the tab bar.
+These buttons will be shown when `tab-bar-history-mode' is enabled.
You can hide these buttons by customizing `tab-bar-format' and removing
`tab-bar-format-history' from it."
(when tab-bar-history-mode
,(alist-get 'close-binding tab))))))
(defun tab-bar-format-tabs ()
- "Show all tabs."
+ "Produce all the tabs for the tab bar."
(let ((i 0))
(mapcan
(lambda (tab)
:help "Click to visit group"))))
(defun tab-bar-format-tabs-groups ()
- "Show tabs with their groups."
+ "Produce tabs for the tab bar grouped according to their groups."
(let* ((tabs (funcall tab-bar-tabs-function))
(current-group (funcall tab-bar-tab-group-function
(tab-bar--current-tab-find tabs)))
`((align-right menu-item ,str ignore))))
(defun tab-bar-format-global ()
- "Format `global-mode-string' to display it in the tab bar.
+ "Produce display of `global-mode-string' in the tab bar.
When `tab-bar-format-global' is added to `tab-bar-format'
(possibly appended after `tab-bar-format-align-right'),
then modes that display information on the mode line