summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/vtable.el
Commit message (Collapse)AuthorAgeFilesLines
* Fix vtable-insert-object line insertionLars Ingebrigtsen2022-10-081-3/+11
| | | | | | * lisp/emacs-lisp/vtable.el (vtable-insert-object): Pass in the correct ellipsis values (bug#58370). (vtable--insert-line): Don't bug out on missing optional arguments.
* Fix percentage width computation in vtableLars Ingebrigtsen2022-09-261-1/+2
| | | | | * lisp/emacs-lisp/vtable.el (vtable--compute-width): Fix percentage computation (bug#58067).
* Don't make a header if the user hasn't specified columns in vtableLars Ingebrigtsen2022-04-231-30/+36
| | | | | | | * lisp/emacs-lisp/vtable.el (vtable): (make-vtable): Store whether the user has specified the columns. (vtable-insert): Don't insert a header line or a header if the user hasn't specified the columns (bug#55075).
* Enable dragging resizing final column in vtableLars Ingebrigtsen2022-04-151-3/+2
| | | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-line): Insert the divider after the final column, too, so that the size can be dragged.
* Add some mouse-face bits to vtableLars Ingebrigtsen2022-04-151-0/+2
| | | | | * lisp/emacs-lisp/vtable.el (make-vtable) (vtable--insert-header-line): Put mouse-face on draggable bits.
* Tweak sorting indicator placement in vtableLars Ingebrigtsen2022-04-151-1/+8
| | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Tweak sorting indicator position.
* Make the sorting indicator prettier in vtableLars Ingebrigtsen2022-04-151-14/+37
| | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Place the sorting indicator flush right in the heading.
* Allow using faces for colors in vtableLars Ingebrigtsen2022-04-151-14/+45
| | | | | | | | * doc/misc/vtable.texi (Making A Table): Adjust color documentation. * lisp/emacs-lisp/vtable.el (make-vtable): Mix more. (vtable--compute-colors): Mix both foreground and background colors. (vtable--make-color-face, vtable--face-blend): New functions. (vtable--insert-line): Adjust usage.
* Allow dragging the divider in vtableLars Ingebrigtsen2022-04-151-16/+36
| | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable): Add a keymap cache. (make-vtable): Allow dragging the divider. (vtable-insert): Don't put the table keymap over the entire line -- avoid the divider, which has its own keymap. (vtable--drag-resize-column): Adjust to the in-buffer divider dragging.
* Allow dragging dividers in vtableLars Ingebrigtsen2022-04-141-10/+19
| | | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Allow dragging dividers. (vtable--drag-resize-column): Adjust function.
* Allow resizing vtable columns by draggingLars Ingebrigtsen2022-04-141-16/+31
| | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Allow resizing by dragging headers. (vtable--drag-resize-column): New function. (vtable-narrow-current-column): Refactor out common bits. (vtable--alter-column-width): To here. (vtable-widen-current-column): Rewrite to use vtable-narrow-current-column.
* Make vtable remember user-altered column widthsLars Ingebrigtsen2022-04-141-0/+6
| | | | | | * lisp/emacs-lisp/vtable.el (vtable-narrow-current-column) (vtable-widen-current-column): Store the size to that it's respected on `g'.
* Ensure that commands like { work on all frames in vtableLars Ingebrigtsen2022-04-141-13/+16
| | | | | | | * lisp/emacs-lisp/vtable.el (vtable--recompute-cache) (vtable--ensure-cache): New functions. (vtable-insert): Use it. (vtable--widths): Ditto.
* Make vtable narrow/widen functions take a prefixLars Ingebrigtsen2022-04-141-8/+16
| | | | | | * lisp/emacs-lisp/vtable.el (vtable-narrow-current-column) (vtable-widen-current-column): Allow using the prefix to say how much to narrow/widen the columns.
* Copy edit make-vtable codeLars Ingebrigtsen2022-04-141-6/+4
| | | | * lisp/emacs-lisp/vtable.el (make-vtable): Clean up code slightly.
* Edit some vtable doc stringsLars Ingebrigtsen2022-04-141-2/+4
| | | | | * lisp/emacs-lisp/vtable.el (make-vtable, vtable): Improve doc strings.
* Further divider fixes for vtableLars Ingebrigtsen2022-04-141-3/+9
| | | | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Don't insert the divider at the end. (vtable-narrow-current-column, vtable-widen-current-column): Don't error out when being called on the divider.
* Fix dividers in vtable header linesLars Ingebrigtsen2022-04-141-2/+2
| | | | | * lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Put the divider in the correct place in the header line.
* Allow having dividers between columns in vtableLars Ingebrigtsen2022-04-141-32/+57
| | | | | | | | * doc/misc/vtable.texi (Making A Table): Document it. * lisp/emacs-lisp/vtable.el (vtable): Add a divider slot. (make-vtable): Accept :divider and :divider-width arguments. (vtable--insert-line, vtable--insert-header-line): Display the divider.
* Allow putting alternating colors on vtable rowsLars Ingebrigtsen2022-04-141-11/+50
| | | | | | | | | * 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.
* Add a new `vtable' faceLars Ingebrigtsen2022-04-131-1/+7
| | | | | | * doc/misc/vtable.texi (Introduction): Document it. * lisp/emacs-lisp/vtable.el (vtable): Add a new face.
* Add support for column background colors in vtableLars Ingebrigtsen2022-04-131-3/+12
| | | | | | | | * doc/misc/vtable.texi (Making A Table): Document it. * lisp/emacs-lisp/vtable.el (vtable): Add a column color element. (make-vtable): Use it. (vtable--insert-line): Insert the colors here.
* Make vtable sorting stableLars Ingebrigtsen2022-03-131-10/+14
| | | | | * lisp/emacs-lisp/vtable.el (vtable--sort): Make the sorting stable.
* Fix regression in vtable-goto-objectLars Ingebrigtsen2022-03-091-1/+1
| | | | | * lisp/emacs-lisp/vtable.el (vtable-goto-object): Fix moving to the object.
* Improve vtable :keymap handlingLars Ingebrigtsen2022-02-211-2/+9
| | | | | * lisp/emacs-lisp/vtable.el (vtable-map, vtable--make-keymap): Don't alter keymaps passed in, and respect parent keymaps.
* Add column sorting order indicators to vtableLars Ingebrigtsen2022-02-191-9/+29
| | | | | | * lisp/emacs-lisp/vtable.el (vtable--indicator): New function. (vtable--insert-header-line): Use it to display sorting order indicators.
* Add a new library to format variable-pitch tablesLars Ingebrigtsen2022-02-191-0/+731
* doc/misc/vtable.texi (Index): New manual. * lisp/emacs-lisp/vtable.el: New library.