mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
Update vtable documentation
* doc/misc/vtable.texi: Document creation of empty vtables. * etc/NEWS: Announce empty vtables. (Bug#73775)
This commit is contained in:
parent
35e1ab970c
commit
ac91d190d6
@ -264,6 +264,10 @@ In the latter case, if @code{:columns} is non-@code{nil} and there's
|
||||
more elements in the sequence than there is in @code{:columns}, only
|
||||
the @code{:columns} first elements are displayed.
|
||||
|
||||
If the @code{:objects} list is empty (and no @code{:objects-function} is
|
||||
defined), an empty vtable is created. In this case, a @code{:columns}
|
||||
spec must be provided.
|
||||
|
||||
@item :objects-function
|
||||
It's often convenient to generate the objects dynamically (for
|
||||
instance, to make reversion work automatically). In that case, this
|
||||
@ -295,6 +299,11 @@ The width of @var{n} @samp{x} characters in the table's face.
|
||||
@var{n} percent of the window's width.
|
||||
@end table
|
||||
|
||||
If no @code{width} is provided, the width is calculated based on the
|
||||
column data (provided in the @code{:objects} list or through the
|
||||
@code{:objects-function}) or, if there is no data, on the basis of the
|
||||
window width.
|
||||
|
||||
@item min-width
|
||||
This uses the same format as @code{width}, but specifies the minimum
|
||||
width (and overrides @code{width} if @code{width} is smaller than this.
|
||||
@ -576,6 +585,8 @@ index is out of range, @var{object} is prepended to @var{table} if the
|
||||
index is too small, or appended if it is too large. In this case,
|
||||
@var{before} is ignored.
|
||||
|
||||
If @var{table} is empty, @var{location} and @var{before} are ignored.
|
||||
|
||||
This also updates the displayed table.
|
||||
@end defun
|
||||
|
||||
|
10
etc/NEWS
10
etc/NEWS
@ -821,6 +821,16 @@ This lets a Lisp program access the core functionality of the
|
||||
program, choosing the program according to the operating system's
|
||||
conventions.
|
||||
|
||||
+++
|
||||
** 'make-vtable' can create an empty vtable.
|
||||
It is now possible to create a vtable without data, by leaving the
|
||||
':objects' list empty, or by providing a ':objects-function' that
|
||||
(initially) produces no data. In such a case, it is necessary to
|
||||
provide a ':columns' spec, so that the number of columns and their
|
||||
widths can be determined. Columns widths can be set explicitly, or they
|
||||
will be calculated based on the window width.
|
||||
|
||||
|
||||
|
||||
* Changes in Emacs 31.1 on Non-Free Operating Systems
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user