emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108955: Cleanup changes following fi


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108955: Cleanup changes following fix for bug #11832.
Date: Sun, 08 Jul 2012 19:38:43 +0300
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108955
fixes bug: http://debbugs.gnu.org/11832
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2012-07-08 19:38:43 +0300
message:
  Cleanup changes following fix for bug #11832.
  
   src/ xdisp.c (display_line): Add commentary about displaying 
   truncation glyphs on GUI frames.
   (produce_special_glyphs): Move here from term.c.
   src/term.c (produce_special_glyphs): Move to xdisp.c.
   src/dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
   section.
modified:
  src/ChangeLog
  src/dispextern.h
  src/term.c
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-08 15:49:39 +0000
+++ b/src/ChangeLog     2012-07-08 16:38:43 +0000
@@ -2,6 +2,14 @@
 
        * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
        has no font, use the frame's font.  (Bug#11813)
+       (display_line): Add commentary about displaying truncation glyphs
+       on GUI frames.
+       (produce_special_glyphs): Move here from term.c.
+
+       * term.c (produce_special_glyphs): Move to xdisp.c.
+
+       * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
+       section.
 
 2012-07-07  Andreas Schwab  <address@hidden>
 

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2012-07-06 21:07:46 +0000
+++ b/src/dispextern.h  2012-07-08 16:38:43 +0000
@@ -3065,7 +3065,7 @@
 extern ptrdiff_t compute_display_string_end (ptrdiff_t,
                                             struct bidi_string_data *);
 extern void produce_stretch_glyph (struct it *);
-
+extern void produce_special_glyphs (struct it *, enum display_element_type);
 
 #ifdef HAVE_WINDOW_SYSTEM
 
@@ -3353,7 +3353,6 @@
 extern int per_line_cost (const char *);
 extern void calculate_costs (struct frame *);
 extern void produce_glyphs (struct it *);
-extern void produce_special_glyphs (struct it *, enum display_element_type);
 extern int tty_capable_p (struct tty_display_info *, unsigned, unsigned long, 
unsigned long);
 extern void set_tty_color_mode (struct tty_display_info *, struct frame *);
 extern struct terminal *get_named_tty (const char *);

=== modified file 'src/term.c'
--- a/src/term.c        2012-07-07 16:36:02 +0000
+++ b/src/term.c        2012-07-08 16:38:43 +0000
@@ -1885,67 +1885,6 @@
     append_glyphless_glyph (it, face_id, str);
 }
 
-
-/* Get information about special display element WHAT in an
-   environment described by IT.  WHAT is one of IT_TRUNCATION or
-   IT_CONTINUATION.  Maybe produce glyphs for WHAT if IT has a
-   non-null glyph_row member.  This function ensures that fields like
-   face_id, c, len of IT are left untouched.  */
-
-void
-produce_special_glyphs (struct it *it, enum display_element_type what)
-{
-  struct it temp_it;
-  Lisp_Object gc;
-  GLYPH glyph;
-
-  temp_it = *it;
-  temp_it.dp = NULL;
-  temp_it.what = IT_CHARACTER;
-  temp_it.len = 1;
-  temp_it.object = make_number (0);
-  memset (&temp_it.current, 0, sizeof temp_it.current);
-
-  if (what == IT_CONTINUATION)
-    {
-      /* Continuation glyph.  For R2L lines, we mirror it by hand.  */
-      if (it->bidi_it.paragraph_dir == R2L)
-       SET_GLYPH_FROM_CHAR (glyph, '/');
-      else
-       SET_GLYPH_FROM_CHAR (glyph, '\\');
-      if (it->dp
-         && (gc = DISP_CONTINUE_GLYPH (it->dp), GLYPH_CODE_P (gc)))
-       {
-         /* FIXME: Should we mirror GC for R2L lines?  */
-         SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
-         spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
-       }
-    }
-  else if (what == IT_TRUNCATION)
-    {
-      /* Truncation glyph.  */
-      SET_GLYPH_FROM_CHAR (glyph, '$');
-      if (it->dp
-         && (gc = DISP_TRUNC_GLYPH (it->dp), GLYPH_CODE_P (gc)))
-       {
-         /* FIXME: Should we mirror GC for R2L lines?  */
-         SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
-         spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
-       }
-    }
-  else
-    abort ();
-
-  temp_it.c = temp_it.char_to_display = GLYPH_CHAR (glyph);
-  temp_it.face_id = GLYPH_FACE (glyph);
-  temp_it.len = CHAR_BYTES (temp_it.c);
-
-  PRODUCE_GLYPHS (&temp_it);
-  it->pixel_width = temp_it.pixel_width;
-  it->nglyphs = temp_it.pixel_width;
-}
-
-
 
 /***********************************************************************
                                Faces

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-07-08 15:49:39 +0000
+++ b/src/xdisp.c       2012-07-08 16:38:43 +0000
@@ -19773,6 +19773,13 @@
 #ifdef HAVE_WINDOW_SYSTEM
              else
                {
+                 /* On a GUI frame, when the right fringe (left
+                    fringe for R2L rows) is turned off, we produce
+                    truncation glyphs preceded by a stretch glyph
+                    whose width is computed such that the truncation
+                    glyphs are aligned at the window margin, even
+                    when very different fonts are used in different
+                    glyph rows.  */
                  int stretch_width = it->last_visible_x - it->current_x;
 
                  row->used[TEXT_AREA] = i;
@@ -24196,6 +24203,65 @@
     it->nglyphs = width;
 }
 
+/* Get information about special display element WHAT in an
+   environment described by IT.  WHAT is one of IT_TRUNCATION or
+   IT_CONTINUATION.  Maybe produce glyphs for WHAT if IT has a
+   non-null glyph_row member.  This function ensures that fields like
+   face_id, c, len of IT are left untouched.  */
+
+void
+produce_special_glyphs (struct it *it, enum display_element_type what)
+{
+  struct it temp_it;
+  Lisp_Object gc;
+  GLYPH glyph;
+
+  temp_it = *it;
+  temp_it.dp = NULL;
+  temp_it.what = IT_CHARACTER;
+  temp_it.len = 1;
+  temp_it.object = make_number (0);
+  memset (&temp_it.current, 0, sizeof temp_it.current);
+
+  if (what == IT_CONTINUATION)
+    {
+      /* Continuation glyph.  For R2L lines, we mirror it by hand.  */
+      if (it->bidi_it.paragraph_dir == R2L)
+       SET_GLYPH_FROM_CHAR (glyph, '/');
+      else
+       SET_GLYPH_FROM_CHAR (glyph, '\\');
+      if (it->dp
+         && (gc = DISP_CONTINUE_GLYPH (it->dp), GLYPH_CODE_P (gc)))
+       {
+         /* FIXME: Should we mirror GC for R2L lines?  */
+         SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
+         spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
+       }
+    }
+  else if (what == IT_TRUNCATION)
+    {
+      /* Truncation glyph.  */
+      SET_GLYPH_FROM_CHAR (glyph, '$');
+      if (it->dp
+         && (gc = DISP_TRUNC_GLYPH (it->dp), GLYPH_CODE_P (gc)))
+       {
+         /* FIXME: Should we mirror GC for R2L lines?  */
+         SET_GLYPH_FROM_GLYPH_CODE (glyph, gc);
+         spec_glyph_lookup_face (XWINDOW (it->window), &glyph);
+       }
+    }
+  else
+    abort ();
+
+  temp_it.c = temp_it.char_to_display = GLYPH_CHAR (glyph);
+  temp_it.face_id = GLYPH_FACE (glyph);
+  temp_it.len = CHAR_BYTES (temp_it.c);
+
+  PRODUCE_GLYPHS (&temp_it);
+  it->pixel_width = temp_it.pixel_width;
+  it->nglyphs = temp_it.pixel_width;
+}
+
 #ifdef HAVE_WINDOW_SYSTEM
 
 /* Calculate line-height and line-spacing properties.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]