diff options
author | Kenichi Handa <handa@m17n.org> | 1997-03-18 23:31:34 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1997-03-18 23:31:34 +0000 |
commit | cd49fad3f12beb3844dac4c75d4ce0a1fda76abd (patch) | |
tree | c9f8a4347e1f7c820b6e992b79fd9c63b65b0ee5 /src/disptab.h | |
parent | a8283a4a985441890328e69970e55779583ed8ac (diff) | |
download | emacs-cd49fad3f12beb3844dac4c75d4ce0a1fda76abd.tar.gz |
(GLYPH_FOLLOW_ALIASES): Assure that the resulting G
contains valid character code.
Diffstat (limited to 'src/disptab.h')
-rw-r--r-- | src/disptab.h | 12 |
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. */ |