mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-16 02:50:26 -08: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:
parent
3b138917b7
commit
e74e17c1f0
7 changed files with 539 additions and 435 deletions
|
|
@ -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
|
examining or changing text operate implicitly on the current buffer
|
||||||
(@pxref{Text}).
|
(@pxref{Text}).
|
||||||
|
|
||||||
Normally, the buffer displayed in the selected window is the current
|
Normally, the buffer displayed in the selected window
|
||||||
buffer, but this is not always so: a Lisp program can temporarily
|
(@pxref{Selecting Windows}) is the current buffer, but this is not
|
||||||
designate any buffer as current in order to operate on its contents,
|
always so: a Lisp program can temporarily designate any buffer as
|
||||||
without changing what is displayed on the screen. The most basic
|
current in order to operate on its contents, without changing what is
|
||||||
function for designating a current buffer is @code{set-buffer}.
|
displayed on the screen. The most basic function for designating a
|
||||||
|
current buffer is @code{set-buffer}.
|
||||||
|
|
||||||
@defun current-buffer
|
@defun current-buffer
|
||||||
This function returns the 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
|
When an editing command returns to the editor command loop, Emacs
|
||||||
automatically calls @code{set-buffer} on the buffer shown in the
|
automatically calls @code{set-buffer} on the buffer shown in the
|
||||||
selected window. This is to prevent confusion: it ensures that the
|
selected window (@pxref{Selecting Windows}). This is to prevent
|
||||||
buffer that the cursor is in, when Emacs reads a command, is the
|
confusion: it ensures that the buffer that the cursor is in, when Emacs
|
||||||
buffer to which that command applies (@pxref{Command Loop}). Thus,
|
reads a command, is the buffer to which that command applies
|
||||||
you should not use @code{set-buffer} to switch visibly to a different
|
(@pxref{Command Loop}). Thus, you should not use @code{set-buffer} to
|
||||||
buffer; for that, use the functions described in @ref{Switching
|
switch visibly to a different buffer; for that, use the functions
|
||||||
Buffers}.
|
described in @ref{Switching Buffers}.
|
||||||
|
|
||||||
When writing a Lisp function, do @emph{not} rely on this behavior of
|
When writing a Lisp function, do @emph{not} rely on this behavior of
|
||||||
the command loop to restore the current buffer after an operation.
|
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
|
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
|
current buffer. In addition, if the current buffer is displayed in the
|
||||||
selected window, this makes sure that the window is either deleted or
|
selected window (@pxref{Selecting Windows}), this makes sure that the
|
||||||
another buffer is shown in it. More precisely, if the selected window
|
window is either deleted or another buffer is shown in it. More
|
||||||
is dedicated (@pxref{Dedicated Windows}) and there are other windows on
|
precisely, if the selected window is dedicated (@pxref{Dedicated
|
||||||
its frame, the window is deleted. If it is the only window on its frame
|
Windows}) and there are other windows on its frame, the window is
|
||||||
and that frame is not the only frame on its terminal, the frame is
|
deleted. If it is the only window on its frame and that frame is not
|
||||||
dismissed by calling the function specified by
|
the only frame on its terminal, the frame is dismissed by calling the
|
||||||
@code{frame-auto-hide-function} (@pxref{Quitting Windows}). Otherwise,
|
function specified by @code{frame-auto-hide-function} (@pxref{Quitting
|
||||||
it calls @code{switch-to-prev-buffer} (@pxref{Window History}) to show
|
Windows}). Otherwise, it calls @code{switch-to-prev-buffer}
|
||||||
another buffer in that window. If @var{buffer-or-name} is displayed in
|
(@pxref{Window History}) to show another buffer in that window. If
|
||||||
some other window, it remains displayed there.
|
@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
|
To replace a buffer in all the windows that display it, use
|
||||||
@code{replace-buffer-in-windows}, @xref{Buffers and Windows}.
|
@code{replace-buffer-in-windows}, @xref{Buffers and Windows}.
|
||||||
|
|
|
||||||
|
|
@ -1048,6 +1048,7 @@ Windows
|
||||||
|
|
||||||
* Basic Windows:: Basic information on using windows.
|
* Basic Windows:: Basic information on using windows.
|
||||||
* Windows and Frames:: Relating windows to the frame they appear on.
|
* 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.
|
* Window Sizes:: Accessing a window's size.
|
||||||
* Resizing Windows:: Changing the sizes of windows.
|
* Resizing Windows:: Changing the sizes of windows.
|
||||||
* Preserving Window Sizes:: Preserving the size 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.
|
* Deleting Windows:: Deleting a window gives its space to other windows.
|
||||||
* Recombining Windows:: Preserving the frame layout when splitting and
|
* Recombining Windows:: Preserving the frame layout when splitting and
|
||||||
deleting windows.
|
deleting windows.
|
||||||
* Selecting Windows:: The selected window is the one that you edit in.
|
|
||||||
* Cyclic Window Ordering:: Moving around the existing windows.
|
* Cyclic Window Ordering:: Moving around the existing windows.
|
||||||
* Buffers and Windows:: Each window displays the contents of a buffer.
|
* Buffers and Windows:: Each window displays the contents of a buffer.
|
||||||
* Switching Buffers:: Higher-level functions for switching to a buffer.
|
* Switching Buffers:: Higher-level functions for switching to a buffer.
|
||||||
|
|
|
||||||
|
|
@ -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.
|
This function itself does not make the new frame the selected frame.
|
||||||
@xref{Input Focus}. The previously selected frame remains selected.
|
@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.
|
new frame for its own reasons.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
|
@ -494,7 +494,8 @@ a graphical terminal:
|
||||||
| | |_____________ Title Bar ______________| |
|
| | |_____________ Title Bar ______________| |
|
||||||
| | (1)_____________ Menu Bar ______________| | ^
|
| | (1)_____________ Menu Bar ______________| | ^
|
||||||
| | (2)_____________ Tool Bar ______________| | ^
|
| | (2)_____________ Tool Bar ______________| | ^
|
||||||
| | (3) _________ Internal Border ________ | | ^
|
| | (3)_____________ Tab Bar _______________| | ^
|
||||||
|
| | | _________ Internal Border ________ | | ^
|
||||||
| | | | ^ | | | |
|
| | | | ^ | | | |
|
||||||
| | | | | | | | |
|
| | | | | | | | |
|
||||||
Outer | | | Inner | | | Native
|
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
|
automatically increase the outer width of a frame in order to
|
||||||
accommodate an overlong tool bar.
|
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
|
@item Native Frame
|
||||||
@cindex native frame
|
@cindex native frame
|
||||||
@cindex native edges
|
@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
|
fringe if they are specified for this frame, see @ref{Layout
|
||||||
Parameters}. Its height can be obtained by removing from that of the
|
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
|
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
|
frame's internal menu and tool bars, the tab bar and one horizontal
|
||||||
specified for this frame.
|
scroll bar if specified for this frame.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@cindex absolute position
|
@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
|
can be one of @code{top}, @code{bottom} @code{left}, @code{right}. The
|
||||||
default is @code{top}.
|
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}
|
@vindex line-spacing@r{, a frame parameter}
|
||||||
@item line-spacing
|
@item line-spacing
|
||||||
Additional space to leave below each text line, in pixels (a positive
|
Additional space to leave below each text line, in pixels (a positive
|
||||||
|
|
@ -2758,7 +2774,8 @@ Terminals}.
|
||||||
@cindex selected frame
|
@cindex selected frame
|
||||||
|
|
||||||
At any time, one frame in Emacs is the @dfn{selected frame}. The
|
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
|
When Emacs displays its frames on several terminals (@pxref{Multiple
|
||||||
Terminals}), each terminal has its own selected frame. But only one
|
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
|
Note that this option does not distinguish ``sloppy'' focus (where the
|
||||||
frame that previously had focus retains focus as long as the mouse
|
frame that previously had focus retains focus as long as the mouse
|
||||||
pointer does not move into another window manager window) from
|
pointer does not move into another window system window) from ``strict''
|
||||||
``strict'' focus (where a frame immediately loses focus when it's left
|
focus (where a frame immediately loses focus when it's left by the mouse
|
||||||
by the mouse pointer). Neither does it recognize whether your window
|
pointer). Neither does it recognize whether your window manager
|
||||||
manager supports delayed focusing or auto-raising where you can
|
supports delayed focusing or auto-raising where you can explicitly
|
||||||
explicitly specify the time until a new frame gets focus or is
|
specify the time until a new frame gets focus or is auto-raised.
|
||||||
auto-raised.
|
|
||||||
|
|
||||||
You can supply a ``focus follows mouse'' policy for individual Emacs
|
You can supply a ``focus follows mouse'' policy for individual Emacs
|
||||||
windows by customizing the variable @code{mouse-autoselect-window}
|
windows by customizing the variable @code{mouse-autoselect-window}
|
||||||
|
|
|
||||||
|
|
@ -1625,19 +1625,18 @@ markers.
|
||||||
@node Window Type
|
@node Window Type
|
||||||
@subsection Window Type
|
@subsection Window Type
|
||||||
|
|
||||||
A @dfn{window} describes the portion of the terminal screen that Emacs
|
A @dfn{window} describes a portion of the screen that Emacs uses to
|
||||||
uses to display a buffer. Every window has one associated buffer, whose
|
display buffers. Every live window (@pxref{Basic Windows}) has one
|
||||||
contents appear in the window. By contrast, a given buffer may appear
|
associated buffer, whose contents appear in that window. By contrast, a
|
||||||
in one window, no window, or several windows.
|
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
|
Though many windows may exist simultaneously, at any time one window
|
||||||
is designated the @dfn{selected window}. This is the window where the
|
is designated the @dfn{selected window} (@pxref{Selecting Windows}).
|
||||||
cursor is (usually) displayed when Emacs is ready for a command. The
|
This is the window where the cursor is (usually) displayed when Emacs is
|
||||||
selected window usually displays the current buffer (@pxref{Current
|
ready for a command. The selected window usually displays the current
|
||||||
Buffer}), but this is not necessarily the case.
|
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}.
|
|
||||||
|
|
||||||
Windows have no read syntax. They print in hash notation, giving the
|
Windows have no read syntax. They print in hash notation, giving the
|
||||||
window number and the name of the buffer being displayed. The window
|
window number and the name of the buffer being displayed. The window
|
||||||
|
|
|
||||||
|
|
@ -179,6 +179,8 @@ copyleft
|
||||||
counterintuitive
|
counterintuitive
|
||||||
cr
|
cr
|
||||||
creatable
|
creatable
|
||||||
|
customization
|
||||||
|
customizations
|
||||||
customize
|
customize
|
||||||
deactivate
|
deactivate
|
||||||
deactivated
|
deactivated
|
||||||
|
|
@ -243,6 +245,8 @@ fmakunbound
|
||||||
fo
|
fo
|
||||||
fol
|
fol
|
||||||
following'
|
following'
|
||||||
|
fontification
|
||||||
|
fontified
|
||||||
fooba
|
fooba
|
||||||
foobaz
|
foobaz
|
||||||
foox
|
foox
|
||||||
|
|
@ -257,6 +261,7 @@ garbles
|
||||||
gc
|
gc
|
||||||
getenv
|
getenv
|
||||||
gid
|
gid
|
||||||
|
glyphs
|
||||||
gp
|
gp
|
||||||
grep
|
grep
|
||||||
gtr
|
gtr
|
||||||
|
|
@ -270,6 +275,8 @@ hostname
|
||||||
hpux
|
hpux
|
||||||
hscroll
|
hscroll
|
||||||
ick
|
ick
|
||||||
|
iconified
|
||||||
|
iconify
|
||||||
id
|
id
|
||||||
idiom
|
idiom
|
||||||
ii
|
ii
|
||||||
|
|
@ -314,6 +321,7 @@ mathsurround
|
||||||
memq
|
memq
|
||||||
mh
|
mh
|
||||||
mini
|
mini
|
||||||
|
minibuf
|
||||||
minibuffer's
|
minibuffer's
|
||||||
minibuffers
|
minibuffers
|
||||||
misalignment
|
misalignment
|
||||||
|
|
@ -387,6 +395,7 @@ passwd
|
||||||
ped
|
ped
|
||||||
perverse
|
perverse
|
||||||
pid
|
pid
|
||||||
|
pixelwise
|
||||||
plist
|
plist
|
||||||
pointer'
|
pointer'
|
||||||
pointm
|
pointm
|
||||||
|
|
@ -417,6 +426,10 @@ reader'
|
||||||
rebind
|
rebind
|
||||||
rec
|
rec
|
||||||
rechecking
|
rechecking
|
||||||
|
redisplay
|
||||||
|
redisplayed
|
||||||
|
redisplaying
|
||||||
|
redisplays
|
||||||
redo
|
redo
|
||||||
redrawing
|
redrawing
|
||||||
redraws
|
redraws
|
||||||
|
|
@ -430,6 +443,7 @@ reinitialize
|
||||||
reinitialized
|
reinitialized
|
||||||
reinstall
|
reinstall
|
||||||
reinstalled
|
reinstalled
|
||||||
|
resizable
|
||||||
resize
|
resize
|
||||||
resized
|
resized
|
||||||
resizes
|
resizes
|
||||||
|
|
@ -486,6 +500,8 @@ terpri
|
||||||
text'
|
text'
|
||||||
tildes
|
tildes
|
||||||
time's
|
time's
|
||||||
|
tooltip
|
||||||
|
tooltips
|
||||||
towards
|
towards
|
||||||
transportable
|
transportable
|
||||||
txt
|
txt
|
||||||
|
|
@ -494,6 +510,7 @@ unbind
|
||||||
unbinding
|
unbinding
|
||||||
unbinds
|
unbinds
|
||||||
unclutters
|
unclutters
|
||||||
|
uncustomized
|
||||||
undefine
|
undefine
|
||||||
undefines
|
undefines
|
||||||
underfull
|
underfull
|
||||||
|
|
@ -520,6 +537,7 @@ vconcat
|
||||||
vectorp
|
vectorp
|
||||||
vn
|
vn
|
||||||
voidness
|
voidness
|
||||||
|
whitespace
|
||||||
window'
|
window'
|
||||||
windowing
|
windowing
|
||||||
windowp
|
windowp
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
25
src/window.c
25
src/window.c
|
|
@ -765,6 +765,19 @@ selected one. */)
|
||||||
{
|
{
|
||||||
return make_fixnum (decode_live_window (window)->use_time);
|
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,
|
DEFUN ("window-pixel-width", Fwindow_pixel_width, Swindow_pixel_width, 0, 1, 0,
|
||||||
doc: /* Return the width of window WINDOW in pixels.
|
doc: /* Return the width of window WINDOW in pixels.
|
||||||
|
|
@ -8122,18 +8135,6 @@ and scrolling positions. */)
|
||||||
return Qt;
|
return Qt;
|
||||||
return Qnil;
|
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);
|
static void init_window_once_for_pdumper (void);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue