summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1997-03-18 23:31:34 +0000
committerKenichi Handa <handa@m17n.org>1997-03-18 23:31:34 +0000
commit0a31c113e07a8e214a969038ef4d07d7ad0b8e5f (patch)
tree329bf5777ccfd844f06ae79c9c1d98982dc383d8 /src
parent83d4793d59b9a364a81a9a75cc8ae8af37712618 (diff)
downloademacs-0a31c113e07a8e214a969038ef4d07d7ad0b8e5f.tar.gz
(GLYPH_FOLLOW_ALIASES): Assure that the resulting G
contains valid character code.
Diffstat (limited to 'src')
-rw-r--r--src/disptab.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/disptab.h b/src/disptab.h
index 6ee008453df..6b2f5f05d51 100644
--- a/src/disptab.h
+++ b/src/disptab.h
@@ -77,10 +77,14 @@ extern Lisp_Object Vglyph_table;
/* Follow all aliases for G in the glyph table given by (BASE,
LENGTH), and set G to the final glyph. */
-#define GLYPH_FOLLOW_ALIASES(base, length, g) \
- while (GLYPH_ALIAS_P ((base), (length), (g))) \
- (g) = GLYPH_ALIAS ((base), (g));
-
+#define GLYPH_FOLLOW_ALIASES(base, length, g) \
+ do { \
+ while (GLYPH_ALIAS_P ((base), (length), (g))) \
+ (g) = GLYPH_ALIAS ((base), (g)); \
+ if (!GLYPH_CHAR_VALID_P (FAST_GLYPH_CHAR (g))) \
+ g = FAST_MAKE_GLYPH (' ', FAST_GLYPH_FACE (g)); \
+ } while (0)
+
/* Assuming that GLYPH_SIMPLE_P (BASE, LEN, G) is 0,
return the length and the address of the character-sequence
used for outputting GLYPH G. */