diff options
| author | Lars Ingebrigtsen | 2022-04-14 01:00:44 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-04-14 01:00:44 +0200 |
| commit | 800998808a1ebf83263ffbdea833c155fcbae7a6 (patch) | |
| tree | 681525e5aa9743eaef1369b34e896888cec79f71 /doc/misc | |
| parent | 864c8013fdd0a548d98d81dd21af2f88f207858a (diff) | |
| download | emacs-800998808a1ebf83263ffbdea833c155fcbae7a6.tar.gz emacs-800998808a1ebf83263ffbdea833c155fcbae7a6.zip | |
Allow putting alternating colors on vtable rows
* doc/misc/vtable.texi (Making A Table): Document it.
* lisp/emacs-lisp/vtable.el (vtable): Add :row-colors.
(make-vtable): Ditto.
(vtable--compute-colors, vtable--color-blend): New functions.
(vtable--insert-line): Take a line number argument and adjust
callers.
Diffstat (limited to 'doc/misc')
| -rw-r--r-- | doc/misc/vtable.texi | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/misc/vtable.texi b/doc/misc/vtable.texi index 4f7b722a289..77cb8663af4 100644 --- a/doc/misc/vtable.texi +++ b/doc/misc/vtable.texi | |||
| @@ -387,11 +387,21 @@ The face to be used. This defaults to @code{vtable}. This face | |||
| 387 | doesn't override the faces in the data, or the faces supplied by the | 387 | doesn't override the faces in the data, or the faces supplied by the |
| 388 | getter and formatter functions. | 388 | getter and formatter functions. |
| 389 | 389 | ||
| 390 | @item :row-colors | ||
| 391 | If present, this should be a list of color names to be used as the | ||
| 392 | background color on the rows. If there are fewer colors here than | ||
| 393 | there are rows, the rows will be repeated. The most common use | ||
| 394 | case here is to have alternating background colors on the rows, so | ||
| 395 | this would usually be a list of two colors. | ||
| 396 | |||
| 390 | @item :column-colors | 397 | @item :column-colors |
| 391 | If present, this should be a list of color names to be used as the | 398 | If present, this should be a list of color names to be used as the |
| 392 | background color on the columns. If there are fewer colors here than | 399 | background color on the columns. If there are fewer colors here than |
| 393 | there are columns, the colors will be repeated. The most common use | 400 | there are columns, the colors will be repeated. The most common use |
| 394 | case here is to have alternating background colors on the columns. | 401 | case here is to have alternating background colors on the columns, so |
| 402 | this would usually be a list of two colors. If both | ||
| 403 | @code{:row-colors} and @code{:column-colors} is present, the colors | ||
| 404 | will be ``blended'' to produce the final colors in the table. | ||
| 395 | 405 | ||
| 396 | @item :actions | 406 | @item :actions |
| 397 | This uses the same syntax as @code{define-keymap}, but doesn't refer | 407 | This uses the same syntax as @code{define-keymap}, but doesn't refer |