From b4e49aee845c2666cea162e3fc83d977207392b9 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 20 Jun 2005 10:45:31 +0000 Subject: [PATCH] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-435 Implement tty vertical-divider face 2005-06-20 Miles Bader * lisp/faces.el (vertical-divider): New face. 2005-06-20 Miles Bader * man/display.texi (Faces): Add `vertical-divider'. 2005-06-20 Miles Bader * src/xfaces.c (Qvertical_divider): New variable. (realize_basic_faces): Realize its face. (syms_of_xfaces): Initialize it. * src/dispextern.h (enum face_id): Add `VERTICAL_DIVIDER_FACE_ID'. * src/dispnew.c (build_frame_matrix_from_leaf_window): Display vertical window-separator on ttys using `vertical-divider' face by default. --- lisp/ChangeLog | 4 ++++ lisp/faces.el | 7 +++++++ man/ChangeLog | 4 ++++ man/display.texi | 6 +++++- src/ChangeLog | 11 +++++++++++ src/dispextern.h | 1 + src/dispnew.c | 13 +++++++++---- src/xfaces.c | 5 ++++- 8 files changed, 45 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 74bbbf70ccc..1377de8b357 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-06-20 Miles Bader + + * faces.el (vertical-divider): New face. + 2005-06-20 Juanma Barranquero * simple.el (kill-whole-line): Doc fix. diff --git a/lisp/faces.el b/lisp/faces.el index dc94beb4aa6..2942438a32a 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1869,6 +1869,13 @@ created." :group 'modeline :group 'basic-faces) +(defface vertical-divider + '((default :inherit mode-line-inactive)) + "Face used for vertical window dividers on ttys." + :version "22.1" + :group 'modeline + :group 'basic-faces) + ;; Make `modeline' an alias for `mode-line', for compatibility. (put 'modeline 'face-alias 'mode-line) (put 'modeline-inactive 'face-alias 'mode-line-inactive) diff --git a/man/ChangeLog b/man/ChangeLog index 82d78054ec3..33541408e4b 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-06-20 Miles Bader + + * display.texi (Faces): Add `vertical-divider'. + 2005-06-17 Richard M. Stallman * text.texi (Adaptive Fill): Minor clarification. diff --git a/man/display.texi b/man/display.texi index 4276209326d..858a33f9ffe 100644 --- a/man/display.texi +++ b/man/display.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997, 2000, 2001, 2002 +@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997, 2000, 2001, 2002, 2005 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Display, Search, Registers, Top @@ -113,6 +113,10 @@ in that face affect mode lines in all windows. @item header-line Similar to @code{mode-line} for a window's header line. Most modes don't use the header line, but the Info mode does. +@item vertical-divider +This face is used for the vertical divider between windows on +character terminals. By default this face inherits from the +@code{mode-line-inactive} face. @item minibuffer-prompt This face is used for the prompt strings displayed in the minibuffer. @item highlight diff --git a/src/ChangeLog b/src/ChangeLog index 12e52237e9b..ab060453f64 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2005-06-20 Miles Bader + + * xfaces.c (Qvertical_divider): New variable. + (realize_basic_faces): Realize its face. + (syms_of_xfaces): Initialize it. + + * dispextern.h (enum face_id): Add `VERTICAL_DIVIDER_FACE_ID'. + + * dispnew.c (build_frame_matrix_from_leaf_window): Display vertical + window-separator on ttys using `vertical-divider' face by default. + 2005-06-17 Richard M. Stallman * xdisp.c (get_next_display_element): Reverse diff --git a/src/dispextern.h b/src/dispextern.h index 63425e58039..4d98f3f1dfd 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1593,6 +1593,7 @@ enum face_id CURSOR_FACE_ID, MOUSE_FACE_ID, MENU_FACE_ID, + VERTICAL_DIVIDER_FACE_ID, BASIC_FACE_ID_SENTINEL }; diff --git a/src/dispnew.c b/src/dispnew.c index 727547d089d..5b0069b03c2 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -2719,10 +2719,15 @@ build_frame_matrix_from_leaf_window (frame_matrix, w) if (!WINDOW_RIGHTMOST_P (w)) { struct Lisp_Char_Table *dp = window_display_table (w); - right_border_glyph = (dp && INTEGERP (DISP_BORDER_GLYPH (dp)) - ? XINT (DISP_BORDER_GLYPH (dp)) - : '|'); - right_border_glyph = spec_glyph_lookup_face (w, right_border_glyph); + + right_border_glyph + = ((dp && INTEGERP (DISP_BORDER_GLYPH (dp))) + ? spec_glyph_lookup_face (w, XINT (DISP_BORDER_GLYPH (dp))) + : '|'); + + if (FAST_GLYPH_FACE (right_border_glyph) <= 0) + right_border_glyph + = FAST_MAKE_GLYPH (right_border_glyph, VERTICAL_DIVIDER_FACE_ID); } } else diff --git a/src/xfaces.c b/src/xfaces.c index 11e72ab7d05..b7ed50d35fe 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -324,7 +324,7 @@ Lisp_Object Qframe_update_face_colors; Lisp_Object Qdefault, Qtool_bar, Qregion, Qfringe; Lisp_Object Qheader_line, Qscroll_bar, Qcursor, Qborder, Qmouse, Qmenu; -Lisp_Object Qmode_line_inactive; +Lisp_Object Qmode_line_inactive, Qvertical_divider; extern Lisp_Object Qmode_line; /* The symbol `face-alias'. A symbols having that property is an @@ -6882,6 +6882,7 @@ realize_basic_faces (f) realize_named_face (f, Qcursor, CURSOR_FACE_ID); realize_named_face (f, Qmouse, MOUSE_FACE_ID); realize_named_face (f, Qmenu, MENU_FACE_ID); + realize_named_face (f, Qvertical_divider, VERTICAL_DIVIDER_FACE_ID); /* Reflect changes in the `menu' face in menu bars. */ if (FRAME_FACE_CACHE (f)->menu_face_changed_p) @@ -8011,6 +8012,8 @@ syms_of_xfaces () staticpro (&Qmouse); Qmode_line_inactive = intern ("mode-line-inactive"); staticpro (&Qmode_line_inactive); + Qvertical_divider = intern ("vertical-divider"); + staticpro (&Qvertical_divider); Qtty_color_desc = intern ("tty-color-desc"); staticpro (&Qtty_color_desc); Qtty_color_standard_values = intern ("tty-color-standard-values"); -- 2.39.2