From a45e35e17336f766e1ef2fe79a95e703d5d184b3 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Mon, 19 Sep 1994 17:28:37 +0000 Subject: [PATCH] Add a new element to display tables controlling side-by-side window borders. * buffer.c (syms_of_buffer): Update doc string for `buffer-display-table'. * disptab.h (DISP_TABLE_SIZE): Bump to 262. (DISP_BORDER_GLYPH): New accessor macro. * xdisp.c (display_text_line): Consult the display table when building side-by-side window borders. --- src/buffer.c | 6 ++++-- src/disptab.h | 3 ++- src/xdisp.c | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index e132f77da93..4239851b226 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2776,7 +2776,7 @@ The display table is a vector created with `make-display-table'.\n\ The first 256 elements control how to display each possible text character.\n\ Each value should be a vector of characters or nil;\n\ nil means display the character in the default fashion.\n\ -The remaining five elements control the display of\n\ +The remaining six elements control the display of\n\ the end of a truncated screen line (element 256, a single character);\n\ the end of a continued line (element 257, a single character);\n\ the escape character used to display character codes in octal\n\ @@ -2784,7 +2784,9 @@ The remaining five elements control the display of\n\ the character used as an arrow for control characters (element 259,\n\ a single character);\n\ the decoration indicating the presence of invisible lines (element 260,\n\ - a vector of characters).\n\ + a vector of characters);\n\ + the character used to draw the border between side-by-side windows\n\ + (element 261, a single character).;\n\ If this variable is nil, the value of `standard-display-table' is used.\n\ Each window can have its own, overriding display table."); #endif diff --git a/src/disptab.h b/src/disptab.h index 235f6bf24fb..d22e52034c4 100644 --- a/src/disptab.h +++ b/src/disptab.h @@ -19,12 +19,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Access the slots of a display-table, according to their purpose. */ -#define DISP_TABLE_SIZE 261 +#define DISP_TABLE_SIZE 262 #define DISP_TRUNC_GLYPH(dp) ((dp)->contents[256]) #define DISP_CONTINUE_GLYPH(dp) ((dp)->contents[257]) #define DISP_ESCAPE_GLYPH(dp) ((dp)->contents[258]) #define DISP_CTRL_GLYPH(dp) ((dp)->contents[259]) #define DISP_INVIS_VECTOR(dp) ((dp)->contents[260]) +#define DISP_BORDER_GLYPH(dp) ((dp)->contents[261]) #define DISP_CHAR_VECTOR(dp, c) ((dp)->contents[c]) extern struct Lisp_Vector *window_display_table (); diff --git a/src/xdisp.c b/src/xdisp.c index 6f22c38f4d1..1ce0c58ae0d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -2504,7 +2504,10 @@ display_text_line (w, start, vpos, hpos, taboffset) them when the scroll bar windows are flickering around to be reconfigured. */ *p1++ = (FRAME_HAS_VERTICAL_SCROLL_BARS (f) - ? ' ' : '|'); + ? ' ' + : (dp && INTEGERP (DISP_BORDER_GLYPH (dp)) + ? DISP_BORDER_GLYPH (dp) + : '|')); } desired_glyphs->used[vpos] = max (desired_glyphs->used[vpos], p1 - desired_glyphs->glyphs[vpos]);