Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-435
authorMiles Bader <miles@gnu.org>
Mon, 20 Jun 2005 10:45:31 +0000 (10:45 +0000)
committerMiles Bader <miles@gnu.org>
Mon, 20 Jun 2005 10:45:31 +0000 (10:45 +0000)
Implement tty vertical-divider face

2005-06-20  Miles Bader  <miles@gnu.org>

   * lisp/faces.el (vertical-divider): New face.

2005-06-20  Miles Bader  <miles@gnu.org>

   * man/display.texi (Faces): Add `vertical-divider'.

2005-06-20  Miles Bader  <miles@gnu.org>

   * 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
lisp/faces.el
man/ChangeLog
man/display.texi
src/ChangeLog
src/dispextern.h
src/dispnew.c
src/xfaces.c

index 74bbbf7..1377de8 100644 (file)
@@ -1,3 +1,7 @@
+2005-06-20  Miles Bader  <miles@gnu.org>
+
+       * faces.el (vertical-divider): New face.
+
 2005-06-20  Juanma Barranquero  <lekktu@gmail.com>
 
        * simple.el (kill-whole-line): Doc fix.
index dc94beb..2942438 100644 (file)
@@ -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)
index 82d7805..3354140 100644 (file)
@@ -1,3 +1,7 @@
+2005-06-20  Miles Bader  <miles@gnu.org>
+
+       * display.texi (Faces): Add `vertical-divider'.
+
 2005-06-17  Richard M. Stallman  <rms@gnu.org>
 
        * text.texi (Adaptive Fill): Minor clarification.
index 4276209..858a33f 100644 (file)
@@ -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
index 12e5223..ab06045 100644 (file)
@@ -1,3 +1,14 @@
+2005-06-20  Miles Bader  <miles@gnu.org>
+
+       * 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  <rms@gnu.org>
 
        * xdisp.c (get_next_display_element): Reverse
index 63425e5..4d98f3f 100644 (file)
@@ -1593,6 +1593,7 @@ enum face_id
   CURSOR_FACE_ID,
   MOUSE_FACE_ID,
   MENU_FACE_ID,
+  VERTICAL_DIVIDER_FACE_ID,
   BASIC_FACE_ID_SENTINEL
 };
 
index 727547d..5b0069b 100644 (file)
@@ -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
index 11e72ab..b7ed50d 100644 (file)
@@ -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");