diff options
| author | Eli Zaretskii | 2015-09-23 16:20:10 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-09-23 16:20:10 +0300 |
| commit | aab67529d229cd0d09ae3b9d7f8bb2f44e1d6276 (patch) | |
| tree | 5a71d5944e5520cc886e3e7c0a69cfa109b129da | |
| parent | 0a133c70f1d2c068e8ad3ed5527f13ea7246fc68 (diff) | |
| download | emacs-aab67529d229cd0d09ae3b9d7f8bb2f44e1d6276.tar.gz emacs-aab67529d229cd0d09ae3b9d7f8bb2f44e1d6276.zip | |
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.
| -rw-r--r-- | doc/lispref/display.texi | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 6a30adf9c90..452462adcfc 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 | |||
| 4387 | Specifies that the width of the stretch should be computed from the | 4387 | Specifies that the width of the stretch should be computed from the |
| 4388 | first character in the group of consecutive characters that have the | 4388 | first character in the group of consecutive characters that have the |
| 4389 | same @code{display} property. The space width is the pixel width of | 4389 | same @code{display} property. The space width is the pixel width of |
| 4390 | that character, multiplied by @var{factor}. This specification is | 4390 | that character, multiplied by @var{factor}. (On text-mode terminals, |
| 4391 | only supported on graphic terminals. | 4391 | the ``pixel width'' of a character is usually 1, but it could be more |
| 4392 | for TABs and double-width CJK characters.) | ||
| 4392 | 4393 | ||
| 4393 | @item :align-to @var{hpos} | 4394 | @item :align-to @var{hpos} |
| 4394 | Specifies that the space should be wide enough to reach @var{hpos}. | 4395 | Specifies that the space should be wide enough to reach @var{hpos}. |
diff --git a/src/xdisp.c b/src/xdisp.c index 0d0bc91efd9..bac74e2a34f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -25956,9 +25956,7 @@ produce_stretch_glyph (struct it *it) | |||
| 25956 | zero_width_ok_p = true; | 25956 | zero_width_ok_p = true; |
| 25957 | width = (int)tem; | 25957 | width = (int)tem; |
| 25958 | } | 25958 | } |
| 25959 | #ifdef HAVE_WINDOW_SYSTEM | 25959 | else if (prop = Fplist_get (plist, QCrelative_width), NUMVAL (prop) > 0) |
| 25960 | else if (FRAME_WINDOW_P (it->f) | ||
| 25961 | && (prop = Fplist_get (plist, QCrelative_width), NUMVAL (prop) > 0)) | ||
| 25962 | { | 25960 | { |
| 25963 | /* Relative width `:relative-width FACTOR' specified and valid. | 25961 | /* Relative width `:relative-width FACTOR' specified and valid. |
| 25964 | Compute the width of the characters having the `glyph' | 25962 | Compute the width of the characters having the `glyph' |
| @@ -25978,10 +25976,9 @@ produce_stretch_glyph (struct it *it) | |||
| 25978 | 25976 | ||
| 25979 | it2.glyph_row = NULL; | 25977 | it2.glyph_row = NULL; |
| 25980 | it2.what = IT_CHARACTER; | 25978 | it2.what = IT_CHARACTER; |
| 25981 | x_produce_glyphs (&it2); | 25979 | PRODUCE_GLYPHS (&it2); |
| 25982 | width = NUMVAL (prop) * it2.pixel_width; | 25980 | width = NUMVAL (prop) * it2.pixel_width; |
| 25983 | } | 25981 | } |
| 25984 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 25985 | else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop)) | 25982 | else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop)) |
| 25986 | && calc_pixel_width_or_height (&tem, it, prop, font, true, | 25983 | && calc_pixel_width_or_height (&tem, it, prop, font, true, |
| 25987 | &align_to)) | 25984 | &align_to)) |