[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master aab6752: Support ':relative-width' space display sp
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master aab6752: Support ':relative-width' space display spec on text-mode terminals |
Date: |
Wed, 23 Sep 2015 13:22:26 +0000 |
branch: master
commit aab67529d229cd0d09ae3b9d7f8bb2f44e1d6276
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Support ':relative-width' space display spec on text-mode terminals
* src/xdisp.c (produce_stretch_glyph): Support ':relative-width'
space display spec on text-mode terminals, by calling
PRODUCE_GLYPHS instead of x_produce_glyphs. Remove the HAVE_WINDOW_SYSTEM
guards from the supporting code, as well as the test for a GUI frame.
---
doc/lispref/display.texi | 5 +++--
src/xdisp.c | 7 ++-----
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 6a30adf..452462a 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -4387,8 +4387,9 @@ width. @var{width} can also be a @dfn{pixel width}
specification
Specifies that the width of the stretch should be computed from the
first character in the group of consecutive characters that have the
same @code{display} property. The space width is the pixel width of
-that character, multiplied by @var{factor}. This specification is
-only supported on graphic terminals.
+that character, multiplied by @var{factor}. (On text-mode terminals,
+the ``pixel width'' of a character is usually 1, but it could be more
+for TABs and double-width CJK characters.)
@item :align-to @var{hpos}
Specifies that the space should be wide enough to reach @var{hpos}.
diff --git a/src/xdisp.c b/src/xdisp.c
index 0d0bc91..bac74e2 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -25956,9 +25956,7 @@ produce_stretch_glyph (struct it *it)
zero_width_ok_p = true;
width = (int)tem;
}
-#ifdef HAVE_WINDOW_SYSTEM
- else if (FRAME_WINDOW_P (it->f)
- && (prop = Fplist_get (plist, QCrelative_width), NUMVAL (prop) > 0))
+ else if (prop = Fplist_get (plist, QCrelative_width), NUMVAL (prop) > 0)
{
/* Relative width `:relative-width FACTOR' specified and valid.
Compute the width of the characters having the `glyph'
@@ -25978,10 +25976,9 @@ produce_stretch_glyph (struct it *it)
it2.glyph_row = NULL;
it2.what = IT_CHARACTER;
- x_produce_glyphs (&it2);
+ PRODUCE_GLYPHS (&it2);
width = NUMVAL (prop) * it2.pixel_width;
}
-#endif /* HAVE_WINDOW_SYSTEM */
else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop))
&& calc_pixel_width_or_height (&tem, it, prop, font, true,
&align_to))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master aab6752: Support ':relative-width' space display spec on text-mode terminals,
Eli Zaretskii <=