1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

Rewrites of Elisp manual including tab-bar and tab-line changes

* doc/lispref/buffers.texi (Current Buffer, Buffer List): Update
references to 'selected-window'.
* doc/lispref/elisp.texi (Top): Move up Selecting Windows section
in front of Window Sizes section.
* doc/lispref/frames.texi (Creating Frames): Say window system
instead of windowing system.
(Frame Layout): Add Tab Bar to layout.
(Layout Parameters): Add 'tab-bar-lines'.
(Input Focus): Say window system window instead of window
manager window.  Fix reference to 'selected-window'.
* doc/lispref/objects.texi (Window Type): Minor rewrite.
* doc/lispref/windows.texi (Basic Windows): Rewrite.  Settle on
term 'window system window' for disambiguation with our windows.
Move 'selected-window' description to Selecting Windows section.
Move schematic of window structure here.  Use 'decorations' for
objects outside the window body.  Say that the areas reserved
for continuation and truncation glyphs, vertical dividers and
line numbers are part of the window body.
(Windows and Frames): Minor rewrite, adding and fixing some
cross references.  Move live window schematic to 'Basic Windows'
section.
(Selecting Windows): Move section in front of Window Sizes
section.  Move description of 'selected-window' here.  Move up
description of 'frame-selected-window' and
'set-frame-selected-window'.  Update and move description of
'window-bump-use-time' here.
(Window Sizes): Throughout use the term 'decorations' instead of
enumerating them individually.  Add 'window-tab-line-height'
description.
(Resizing Windows): Again use the term 'decorations' instead of
enumerating them individually.
(Splitting Windows): Minor fix.
(Cyclic Window Ordering): Improve descriptions of 'get-lru-window'
and 'get-mru-window'.  Move 'window-bump-use-time' to Selecting
Windows section.
(Coordinates and Windows, Window Configurations): Once more use
the term 'decorations' instead of enumerating them individually.
* src/window.c (Fwindow_bump_use_time): Move after
'window-use-time'.  Make it work for live windows only.  Make
WINDOW argument optional.  Update doc-string.
This commit is contained in:
Martin Rudalics 2021-10-18 09:58:48 +02:00
parent 3b138917b7
commit e74e17c1f0
7 changed files with 539 additions and 435 deletions

View File

@ -89,11 +89,12 @@ in which most editing takes place. Most of the primitives for
examining or changing text operate implicitly on the current buffer
(@pxref{Text}).
Normally, the buffer displayed in the selected window is the current
buffer, but this is not always so: a Lisp program can temporarily
designate any buffer as current in order to operate on its contents,
without changing what is displayed on the screen. The most basic
function for designating a current buffer is @code{set-buffer}.
Normally, the buffer displayed in the selected window
(@pxref{Selecting Windows}) is the current buffer, but this is not
always so: a Lisp program can temporarily designate any buffer as
current in order to operate on its contents, without changing what is
displayed on the screen. The most basic function for designating a
current buffer is @code{set-buffer}.
@defun current-buffer
This function returns the current buffer.
@ -118,12 +119,12 @@ on it.
When an editing command returns to the editor command loop, Emacs
automatically calls @code{set-buffer} on the buffer shown in the
selected window. This is to prevent confusion: it ensures that the
buffer that the cursor is in, when Emacs reads a command, is the
buffer to which that command applies (@pxref{Command Loop}). Thus,
you should not use @code{set-buffer} to switch visibly to a different
buffer; for that, use the functions described in @ref{Switching
Buffers}.
selected window (@pxref{Selecting Windows}). This is to prevent
confusion: it ensures that the buffer that the cursor is in, when Emacs
reads a command, is the buffer to which that command applies
(@pxref{Command Loop}). Thus, you should not use @code{set-buffer} to
switch visibly to a different buffer; for that, use the functions
described in @ref{Switching Buffers}.
When writing a Lisp function, do @emph{not} rely on this behavior of
the command loop to restore the current buffer after an operation.
@ -912,16 +913,17 @@ History}) provided it is shown in that window.
If @var{buffer-or-name} is @code{nil} or omitted, this means to bury the
current buffer. In addition, if the current buffer is displayed in the
selected window, this makes sure that the window is either deleted or
another buffer is shown in it. More precisely, if the selected window
is dedicated (@pxref{Dedicated Windows}) and there are other windows on
its frame, the window is deleted. If it is the only window on its frame
and that frame is not the only frame on its terminal, the frame is
dismissed by calling the function specified by
@code{frame-auto-hide-function} (@pxref{Quitting Windows}). Otherwise,
it calls @code{switch-to-prev-buffer} (@pxref{Window History}) to show
another buffer in that window. If @var{buffer-or-name} is displayed in
some other window, it remains displayed there.
selected window (@pxref{Selecting Windows}), this makes sure that the
window is either deleted or another buffer is shown in it. More
precisely, if the selected window is dedicated (@pxref{Dedicated
Windows}) and there are other windows on its frame, the window is
deleted. If it is the only window on its frame and that frame is not
the only frame on its terminal, the frame is dismissed by calling the
function specified by @code{frame-auto-hide-function} (@pxref{Quitting
Windows}). Otherwise, it calls @code{switch-to-prev-buffer}
(@pxref{Window History}) to show another buffer in that window. If
@var{buffer-or-name} is displayed in some other window, it remains
displayed there.
To replace a buffer in all the windows that display it, use
@code{replace-buffer-in-windows}, @xref{Buffers and Windows}.

View File

@ -1048,6 +1048,7 @@ Windows
* Basic Windows:: Basic information on using windows.
* Windows and Frames:: Relating windows to the frame they appear on.
* Selecting Windows:: The selected window is the one that you edit in.
* Window Sizes:: Accessing a window's size.
* Resizing Windows:: Changing the sizes of windows.
* Preserving Window Sizes:: Preserving the size of windows.
@ -1055,7 +1056,6 @@ Windows
* Deleting Windows:: Deleting a window gives its space to other windows.
* Recombining Windows:: Preserving the frame layout when splitting and
deleting windows.
* Selecting Windows:: The selected window is the one that you edit in.
* Cyclic Window Ordering:: Moving around the existing windows.
* Buffers and Windows:: Each window displays the contents of a buffer.
* Switching Buffers:: Higher-level functions for switching to a buffer.

View File

@ -151,7 +151,7 @@ the window (a.k.a.@: the @dfn{dominating} monitor).
This function itself does not make the new frame the selected frame.
@xref{Input Focus}. The previously selected frame remains selected.
On graphical terminals, however, the windowing system may select the
On graphical terminals, however, the window system may select the
new frame for its own reasons.
@end deffn
@ -494,7 +494,8 @@ a graphical terminal:
| | |_____________ Title Bar ______________| |
| | (1)_____________ Menu Bar ______________| | ^
| | (2)_____________ Tool Bar ______________| | ^
| | (3) _________ Internal Border ________ | | ^
| | (3)_____________ Tab Bar _______________| | ^
| | | _________ Internal Border ________ | | ^
| | | | ^ | | | |
| | | | | | | | |
Outer | | | Inner | | | Native
@ -640,6 +641,14 @@ GTK+, on the other hand, never wraps the tool bar but may
automatically increase the outer width of a frame in order to
accommodate an overlong tool bar.
@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.
Display of the tab bar can be suppressed by setting the
@code{tab-bar-lines} parameter (@pxref{Layout Parameters}) to zero.
@item Native Frame
@cindex native frame
@cindex native edges
@ -740,8 +749,8 @@ the internal border, one vertical scroll bar, and one left and one right
fringe if they are specified for this frame, see @ref{Layout
Parameters}. Its height can be obtained by removing from that of the
native height the widths of the internal border and the heights of the
frame's internal menu and tool bars and one horizontal scroll bar if
specified for this frame.
frame's internal menu and tool bars, the tab bar and one horizontal
scroll bar if specified for this frame.
@end table
@cindex absolute position
@ -1875,6 +1884,13 @@ The position of the tool bar when Emacs was built with GTK+. Its value
can be one of @code{top}, @code{bottom} @code{left}, @code{right}. The
default is @code{top}.
@vindex tab-bar-lines@r{, a frame parameter}
@item tab-bar-lines
The number of lines to use for the tab bar (@pxref{Tab Bars,,,emacs, The
GNU Emacs Manual}). The default is one if Tab Bar mode is enabled and
zero otherwise. This value may change whenever the tab bar wraps
(@pxref{Frame Layout}).
@vindex line-spacing@r{, a frame parameter}
@item line-spacing
Additional space to leave below each text line, in pixels (a positive
@ -2758,7 +2774,8 @@ Terminals}.
@cindex selected frame
At any time, one frame in Emacs is the @dfn{selected frame}. The
selected window always resides on the selected frame.
selected window (@pxref{Selecting Windows}) always resides on the
selected frame.
When Emacs displays its frames on several terminals (@pxref{Multiple
Terminals}), each terminal has its own selected frame. But only one
@ -2992,12 +3009,11 @@ Auto-selection}).
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 manager 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 specify the time until a new frame gets focus or is
auto-raised.
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
specify the time until a new frame gets focus or is auto-raised.
You can supply a ``focus follows mouse'' policy for individual Emacs
windows by customizing the variable @code{mouse-autoselect-window}

View File

@ -1625,19 +1625,18 @@ markers.
@node Window Type
@subsection Window Type
A @dfn{window} describes the portion of the terminal screen that Emacs
uses to display a buffer. Every window has one associated buffer, whose
contents appear in the window. By contrast, a given buffer may appear
in one window, no window, or several windows.
A @dfn{window} describes a portion of the screen that Emacs uses to
display buffers. Every live window (@pxref{Basic Windows}) has one
associated buffer, whose contents appear in that window. By contrast, a
given buffer may appear in one window, no window, or several windows.
Windows are grouped on the screen into frames; each window belongs to
one and only one frame. @xref{Frame Type}.
Though many windows may exist simultaneously, at any time one window
is designated the @dfn{selected window}. This is the window where the
cursor is (usually) displayed when Emacs is ready for a command. The
selected window usually displays the current buffer (@pxref{Current
Buffer}), but this is not necessarily the case.
Windows are grouped on the screen into frames; each window belongs to
one and only one frame. @xref{Frame Type}.
is designated the @dfn{selected window} (@pxref{Selecting Windows}).
This is the window where the cursor is (usually) displayed when Emacs is
ready for a command. The selected window usually displays the current
buffer (@pxref{Current Buffer}), but this is not necessarily the case.
Windows have no read syntax. They print in hash notation, giving the
window number and the name of the buffer being displayed. The window

View File

@ -179,6 +179,8 @@ copyleft
counterintuitive
cr
creatable
customization
customizations
customize
deactivate
deactivated
@ -243,6 +245,8 @@ fmakunbound
fo
fol
following'
fontification
fontified
fooba
foobaz
foox
@ -257,6 +261,7 @@ garbles
gc
getenv
gid
glyphs
gp
grep
gtr
@ -270,6 +275,8 @@ hostname
hpux
hscroll
ick
iconified
iconify
id
idiom
ii
@ -314,6 +321,7 @@ mathsurround
memq
mh
mini
minibuf
minibuffer's
minibuffers
misalignment
@ -387,6 +395,7 @@ passwd
ped
perverse
pid
pixelwise
plist
pointer'
pointm
@ -417,6 +426,10 @@ reader'
rebind
rec
rechecking
redisplay
redisplayed
redisplaying
redisplays
redo
redrawing
redraws
@ -430,6 +443,7 @@ reinitialize
reinitialized
reinstall
reinstalled
resizable
resize
resized
resizes
@ -486,6 +500,8 @@ terpri
text'
tildes
time's
tooltip
tooltips
towards
transportable
txt
@ -494,6 +510,7 @@ unbind
unbinding
unbinds
unclutters
uncustomized
undefine
undefines
underfull
@ -520,6 +537,7 @@ vconcat
vectorp
vn
voidness
whitespace
window'
windowing
windowp

File diff suppressed because it is too large Load Diff

View File

@ -765,6 +765,19 @@ selected one. */)
{
return make_fixnum (decode_live_window (window)->use_time);
}
DEFUN ("window-bump-use-time", Fwindow_bump_use_time,
Swindow_bump_use_time, 0, 1, 0,
doc: /* Mark WINDOW as having been most recently used.
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
struct window *w = decode_live_window (window);
w->use_time = ++window_select_count;
return Qnil;
}
DEFUN ("window-pixel-width", Fwindow_pixel_width, Swindow_pixel_width, 0, 1, 0,
doc: /* Return the width of window WINDOW in pixels.
@ -8122,18 +8135,6 @@ and scrolling positions. */)
return Qt;
return Qnil;
}
DEFUN ("window-bump-use-time", Fwindow_bump_use_time,
Swindow_bump_use_time, 1, 1, 0,
doc: /* Mark WINDOW as having been recently used. */)
(Lisp_Object window)
{
struct window *w = decode_valid_window (window);
w->use_time = ++window_select_count;
return Qnil;
}
static void init_window_once_for_pdumper (void);