]> git.eshelyaron.com Git - emacs.git/commitdiff
Add a new `vtable' face
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 13 Apr 2022 21:19:01 +0000 (23:19 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 13 Apr 2022 21:19:10 +0000 (23:19 +0200)
* doc/misc/vtable.texi (Introduction): Document it.

* lisp/emacs-lisp/vtable.el (vtable): Add a new face.

doc/misc/vtable.texi
lisp/emacs-lisp/vtable.el

index 48e6301fce0130e240cbf772505554a100425f0f..4f7b722a289ba9cf92fd998bafbff95abf907163 100644 (file)
@@ -88,9 +88,9 @@ Here's just about the simplest vtable that can be created:
             ("Gazonk" 45)))
 @end lisp
 
-By default, vtable uses the @code{variable-pitch} font, and
-right-aligns columns that have only numerical data (and left-aligns
-the rest).
+By default, vtable uses the @code{vtable} face (which inherits from
+the @code{variable-pitch} face), and right-aligns columns that have
+only numerical data (and left-aligns the rest).
 
 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}.
 
 @item :face
-The face to be used.  This defaults to @code{variable-pitch}.  This
-face doesn't override the faces in the data, or the faces supplied by
-the getter and formatter functions.
+The face to be used.  This defaults to @code{vtable}.  This face
+doesn't override the faces in the data, or the faces supplied by the
+getter and formatter functions.
 
 @item :column-colors
 If present, this should be a list of color names to be used as the
index 98106e4670026be557ff98ea0195df3abda8128b..3e521c94a5c4ebcecba65208902e321d7c495bcd 100644 (file)
 (require 'text-property-search)
 (require 'mule-util)
 
+(defface vtable
+  '((t :inherit variable-pitch))
+  "Face used (by default) for vtables."
+  :version "29.1"
+  :group 'faces)
+
 (cl-defstruct vtable-column
   "A vtable column."
   name
@@ -79,7 +85,7 @@
                             formatter
                             displayer
                             (use-header-line t)
-                            (face 'variable-pitch)
+                            (face 'vtable)
                             actions keymap
                             (separator-width 1)
                             sort-by