1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Add a new `vtable' face

* doc/misc/vtable.texi (Introduction): Document it.

* lisp/emacs-lisp/vtable.el (vtable): Add a new face.
This commit is contained in:
Lars Ingebrigtsen 2022-04-13 23:19:01 +02:00
parent 10c675b960
commit 6c3869a104
2 changed files with 13 additions and 7 deletions

View file

@ -88,9 +88,9 @@ Here's just about the simplest vtable that can be created:
("Gazonk" 45))) ("Gazonk" 45)))
@end lisp @end lisp
By default, vtable uses the @code{variable-pitch} font, and By default, vtable uses the @code{vtable} face (which inherits from
right-aligns columns that have only numerical data (and left-aligns the @code{variable-pitch} face), and right-aligns columns that have
the rest). only numerical data (and left-aligns the rest).
You'd normally want to name the columns: You'd normally want to name the columns:
@ -383,9 +383,9 @@ there are several tables in the same buffer, then this should be
@code{nil}. @code{nil}.
@item :face @item :face
The face to be used. This defaults to @code{variable-pitch}. This The face to be used. This defaults to @code{vtable}. This face
face doesn't override the faces in the data, or the faces supplied by doesn't override the faces in the data, or the faces supplied by the
the getter and formatter functions. getter and formatter functions.
@item :column-colors @item :column-colors
If present, this should be a list of color names to be used as the If present, this should be a list of color names to be used as the

View file

@ -28,6 +28,12 @@
(require 'text-property-search) (require 'text-property-search)
(require 'mule-util) (require 'mule-util)
(defface vtable
'((t :inherit variable-pitch))
"Face used (by default) for vtables."
:version "29.1"
:group 'faces)
(cl-defstruct vtable-column (cl-defstruct vtable-column
"A vtable column." "A vtable column."
name name
@ -79,7 +85,7 @@
formatter formatter
displayer displayer
(use-header-line t) (use-header-line t)
(face 'variable-pitch) (face 'vtable)
actions keymap actions keymap
(separator-width 1) (separator-width 1)
sort-by sort-by