[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xdisp.c,v
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/xdisp.c,v |
Date: |
Wed, 27 Feb 2008 22:49:40 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kim F. Storm <kfstorm> 08/02/27 22:49:39
Index: xdisp.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1192
retrieving revision 1.1193
diff -u -b -r1.1192 -r1.1193
--- xdisp.c 26 Feb 2008 18:18:04 -0000 1.1192
+++ xdisp.c 27 Feb 2008 22:49:39 -0000 1.1193
@@ -5809,29 +5809,29 @@
can be defined in the display table. Fill
IT->ctl_chars with glyphs for what we have to
display. Then, set IT->dpvec to these glyphs. */
- GLYPH g;
+ Lisp_Object gc;
int ctl_len;
int face_id, lface_id = 0 ;
- GLYPH escape_glyph;
+ int escape_glyph;
/* Handle control characters with ^. */
if (it->c < 128 && it->ctl_arrow_p)
{
+ int g;
+
g = '^'; /* default glyph for Control */
/* Set IT->ctl_chars[0] to the glyph for `^'. */
if (it->dp
- && INTEGERP (DISP_CTRL_GLYPH (it->dp))
- && GLYPH_CHAR_VALID_P (XINT (DISP_CTRL_GLYPH (it->dp))))
+ && (gc = DISP_CTRL_GLYPH (it->dp), GLYPH_CODE_P (gc))
+ && GLYPH_CODE_CHAR_VALID_P (gc))
{
- g = XINT (DISP_CTRL_GLYPH (it->dp));
- lface_id = FAST_GLYPH_FACE (g);
+ g = GLYPH_CODE_CHAR (gc);
+ lface_id = GLYPH_CODE_FACE (gc);
}
if (lface_id)
{
- g = FAST_GLYPH_CHAR (g);
- face_id = merge_faces (it->f, Qt, lface_id,
- it->face_id);
+ face_id = merge_faces (it->f, Qt, lface_id, it->face_id);
}
else if (it->f == last_escape_glyph_frame
&& it->face_id == last_escape_glyph_face_id)
@@ -5849,8 +5849,7 @@
}
XSETINT (it->ctl_chars[0], g);
- g = it->c ^ 0100;
- XSETINT (it->ctl_chars[1], g);
+ XSETINT (it->ctl_chars[1], it->c ^ 0100);
ctl_len = 2;
goto display_control;
}
@@ -5865,8 +5864,8 @@
face_id = merge_faces (it->f, Qnobreak_space, 0,
it->face_id);
- g = it->c = ' ';
- XSETINT (it->ctl_chars[0], g);
+ it->c = ' ';
+ XSETINT (it->ctl_chars[0], ' ');
ctl_len = 1;
goto display_control;
}
@@ -5877,17 +5876,16 @@
escape_glyph = '\\';
if (it->dp
- && INTEGERP (DISP_ESCAPE_GLYPH (it->dp))
- && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp))))
+ && (gc = DISP_ESCAPE_GLYPH (it->dp), GLYPH_CODE_P (gc))
+ && GLYPH_CODE_CHAR_VALID_P (gc))
{
- escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp));
- lface_id = FAST_GLYPH_FACE (escape_glyph);
+ escape_glyph = GLYPH_CODE_CHAR (gc);
+ lface_id = GLYPH_CODE_FACE (gc);
}
if (lface_id)
{
/* The display table specified a face.
Merge it into face_id and also into escape_glyph. */
- escape_glyph = FAST_GLYPH_CHAR (escape_glyph);
face_id = merge_faces (it->f, Qt, lface_id,
it->face_id);
}
@@ -5912,8 +5910,8 @@
if (EQ (Vnobreak_char_display, Qt)
&& it->c == 0xAD)
{
- g = it->c = '-';
- XSETINT (it->ctl_chars[0], g);
+ it->c = '-';
+ XSETINT (it->ctl_chars[0], '-');
ctl_len = 1;
goto display_control;
}
@@ -5924,8 +5922,8 @@
if (it->c == 0xA0 || it->c == 0xAD)
{
XSETINT (it->ctl_chars[0], escape_glyph);
- g = it->c = (it->c == 0xA0 ? ' ' : '-');
- XSETINT (it->ctl_chars[1], g);
+ it->c = (it->c == 0xA0 ? ' ' : '-');
+ XSETINT (it->ctl_chars[1], it->c);
ctl_len = 2;
goto display_control;
}
@@ -5961,6 +5959,7 @@
for (i = 0; i < len; i++)
{
+ int g;
XSETINT (it->ctl_chars[i * 4], escape_glyph);
/* Insert three more glyphs into IT->ctl_chars for
the octal display of the character. */
@@ -6200,18 +6199,20 @@
next_element_from_display_vector (it)
struct it *it;
{
+ Lisp_Object gc;
+
/* Precondition. */
xassert (it->dpvec && it->current.dpvec_index >= 0);
it->face_id = it->saved_face_id;
- if (INTEGERP (*it->dpvec)
- && GLYPH_CHAR_VALID_P (XFASTINT (*it->dpvec)))
- {
- GLYPH g;
+ /* KFS: This code used to check ip->dpvec[0] instead of the current element.
+ That seemed totally bogus - so I changed it... */
- g = XFASTINT (it->dpvec[it->current.dpvec_index]);
- it->c = FAST_GLYPH_CHAR (g);
+ if ((gc = it->dpvec[it->current.dpvec_index], GLYPH_CODE_P (gc))
+ && GLYPH_CODE_CHAR_VALID_P (gc))
+ {
+ it->c = GLYPH_CODE_CHAR (gc);
it->len = CHAR_BYTES (it->c);
/* The entry may contain a face id to use. Such a face id is
@@ -6221,7 +6222,7 @@
it->face_id = it->dpvec_face_id;
else
{
- int lface_id = FAST_GLYPH_FACE (g);
+ int lface_id = GLYPH_CODE_FACE (gc);
if (lface_id > 0)
it->face_id = merge_faces (it->f, Qt, lface_id,
it->saved_face_id);
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, (continued)
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Stefan Monnier, 2008/02/06
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Kenichi Handa, 2008/02/16
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Juanma Barranquero, 2008/02/17
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Kenichi Handa, 2008/02/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Kenichi Handa, 2008/02/21
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Stefan Monnier, 2008/02/22
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Stefan Monnier, 2008/02/24
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Kenichi Handa, 2008/02/24
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Kenichi Handa, 2008/02/25
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Stefan Monnier, 2008/02/26
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v,
Kim F. Storm <=
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Kenichi Handa, 2008/02/27
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Kenichi Handa, 2008/02/28
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Chong Yidong, 2008/02/28
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Stefan Monnier, 2008/02/28
- [Emacs-diffs] Changes to emacs/src/xdisp.c,v, Chong Yidong, 2008/02/28