diff options
| author | Gerd Möllmann | 2025-01-26 11:31:32 +0100 |
|---|---|---|
| committer | Gerd Möllmann | 2025-01-26 16:41:01 +0100 |
| commit | 4e78a3e117f4ca0b6b9f3b7a2d7919cb5b2e0295 (patch) | |
| tree | 670d6de7ac8f3cb465c74fb2f1c97e43ca5f8fc2 /doc | |
| parent | 01d93d56cd469ddb45d142da948caef9f2dc1a3f (diff) | |
| download | emacs-4e78a3e117f4ca0b6b9f3b7a2d7919cb5b2e0295.tar.gz emacs-4e78a3e117f4ca0b6b9f3b7a2d7919cb5b2e0295.zip | |
Display separators on tty menus with display table entries
* src/xdisp.c (display_tty_menu_separator): Lookup separator char in
standard-display-table, make a string, and display that using
display_string.
* src/xdisp.c (display_tty_menu_separator_char): New function.
(display_tty_menu_separator): Use it.
* lisp/disp-table.el (display-table): Increase from 12 to 18.
(box-double-vertical, box-double-horizontal, box-double-down-right)
(box-double-down-left, box-double-up-right, box-double-up-left): New
symbols for extra slots.
(display-table-slot, set-display-table-slot): Change doc string.
(describe-display-table): Describe new slots.
(standard-display-unicode-special-glyphs): Define new slots.
* src/disptab.h (DISP_TABLE_P): Add enumerators.
(DISP_TABLE_EXTRA_SLOTS): Define based on enum box.
* src/dispnew.c (produce_box_glyphs): Add new enumerators to switch to
make it exhaustive.
* src/xdisp.c (display_tty_menu_separator): Use BOX_DOUBLE_HORIZONTAL
for '=' if present.
* doc/lispref/display.texi: Add documentation.
* etc/NEWS: Mention in NEWS.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/display.texi | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index b17ee2e96a1..39f182995c0 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -8715,6 +8715,20 @@ scroll bars are supported and in use, a scroll bar separates the two | |||
| 8715 | windows, and if there are no vertical scroll bars and no dividers | 8715 | windows, and if there are no vertical scroll bars and no dividers |
| 8716 | (@pxref{Window Dividers}), Emacs uses a thin line to indicate the | 8716 | (@pxref{Window Dividers}), Emacs uses a thin line to indicate the |
| 8717 | border. | 8717 | border. |
| 8718 | |||
| 8719 | @item 6 to 11 | ||
| 8720 | |||
| 8721 | The glyphs for a single-line border around child frames on a terminal, | ||
| 8722 | in the order of vertical, horizontal, down-right edge, down-left edge, | ||
| 8723 | up-right, and up-left edge glyphs. The horizontal glyph is also used for | ||
| 8724 | the single-line tty menu separator. | ||
| 8725 | |||
| 8726 | @item 12 to 17 | ||
| 8727 | |||
| 8728 | The glyphs for a double-line border, in the order of vertical, | ||
| 8729 | horizontal, down-right edge, down-left edge, up-right, and up-left edge | ||
| 8730 | glyphs. The horizontal glyph is also used for the single-line tty menu | ||
| 8731 | separator, the other glyphs are not yet used. | ||
| 8718 | @end table | 8732 | @end table |
| 8719 | 8733 | ||
| 8720 | For example, here is how to construct a display table that mimics | 8734 | For example, here is how to construct a display table that mimics |
| @@ -8737,24 +8751,34 @@ the effect of setting @code{ctl-arrow} to a non-@code{nil} value | |||
| 8737 | @defun display-table-slot display-table slot | 8751 | @defun display-table-slot display-table slot |
| 8738 | This function returns the value of the extra slot @var{slot} of | 8752 | This function returns the value of the extra slot @var{slot} of |
| 8739 | @var{display-table}. The argument @var{slot} may be a number from 0 to | 8753 | @var{display-table}. The argument @var{slot} may be a number from 0 to |
| 8740 | 5 inclusive, or a slot name (symbol). Valid symbols are | 8754 | 17 inclusive, or a slot name, a symbol. |
| 8741 | @code{truncation}, @code{wrap}, @code{escape}, @code{control}, | ||
| 8742 | @code{selective-display}, and @code{vertical-border}. | ||
| 8743 | @end defun | 8755 | @end defun |
| 8744 | 8756 | ||
| 8745 | @defun set-display-table-slot display-table slot value | 8757 | @defun set-display-table-slot display-table slot value |
| 8746 | This function stores @var{value} in the extra slot @var{slot} of | 8758 | This function stores @var{value} in the extra slot @var{slot} of |
| 8747 | @var{display-table}. The argument @var{slot} may be a number from 0 to | 8759 | @var{display-table}. The argument @var{slot} may be a number from 0 to |
| 8748 | 5 inclusive, or a slot name (symbol). Valid symbols are | 8760 | 17 inclusive, or a slot name, a symbol. |
| 8749 | @code{truncation}, @code{wrap}, @code{escape}, @code{control}, | ||
| 8750 | @code{selective-display}, and @code{vertical-border}. | ||
| 8751 | @end defun | 8761 | @end defun |
| 8752 | 8762 | ||
| 8763 | Valid slot name symbols are @code{truncation}, @code{wrap}, | ||
| 8764 | @code{escape}, @code{control}, @code{selective-display}, | ||
| 8765 | @code{vertical-border}, @code{box-vertical}, @code{box-horizontal}, | ||
| 8766 | @code{box-down-right}, @code{box-down-left}, @code{box-up-right}, | ||
| 8767 | @code{box-up-left}, @code{box-double-vertical}, | ||
| 8768 | @code{box-double-horizontal}, @code{box-double-down-right}, | ||
| 8769 | @code{box-double-down-left}, @code{box-double-down-left}, | ||
| 8770 | @code{box-double-up-left}. | ||
| 8771 | |||
| 8753 | @defun describe-display-table display-table | 8772 | @defun describe-display-table display-table |
| 8754 | This function displays a description of the display table | 8773 | This function displays a description of the display table |
| 8755 | @var{display-table} in a help buffer. | 8774 | @var{display-table} in a help buffer. |
| 8756 | @end defun | 8775 | @end defun |
| 8757 | 8776 | ||
| 8777 | @defun standard-display-unicode-special-glyphs | ||
| 8778 | This function sets the extra slots of @var{standard-display-table} with | ||
| 8779 | suitable Unicode characters. | ||
| 8780 | @end defun | ||
| 8781 | |||
| 8758 | @deffn Command describe-current-display-table | 8782 | @deffn Command describe-current-display-table |
| 8759 | This command displays a description of the current display table in a | 8783 | This command displays a description of the current display table in a |
| 8760 | help buffer. | 8784 | help buffer. |