diff options
| author | Kim F. Storm | 2005-03-01 13:38:34 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-03-01 13:38:34 +0000 |
| commit | 1868c863edaf8bd1472a83300964899ddd62aeb7 (patch) | |
| tree | 11ee86bafba4a35fb2f427f8d7c79368a7b89e30 /src | |
| parent | 6b640092bc7fe802f77ab9ec16e73fa313b5c58a (diff) | |
| download | emacs-1868c863edaf8bd1472a83300964899ddd62aeb7.tar.gz emacs-1868c863edaf8bd1472a83300964899ddd62aeb7.zip | |
(get_next_display_element): Fix control and escape
glyph from display vector. From Ehud Karni <ehud@unix.mvs.co.il>
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index ea7945ad07e..613f6f09b44 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5087,11 +5087,12 @@ get_next_display_element (it) | |||
| 5087 | display. Then, set IT->dpvec to these glyphs. */ | 5087 | display. Then, set IT->dpvec to these glyphs. */ |
| 5088 | GLYPH g; | 5088 | GLYPH g; |
| 5089 | int ctl_len; | 5089 | int ctl_len; |
| 5090 | int face_id, lface_id; | 5090 | int face_id, lface_id = 0 ; |
| 5091 | GLYPH escape_glyph; | 5091 | GLYPH escape_glyph; |
| 5092 | 5092 | ||
| 5093 | if (it->c < 128 && it->ctl_arrow_p) | 5093 | if (it->c < 128 && it->ctl_arrow_p) |
| 5094 | { | 5094 | { |
| 5095 | g = '^'; /* default glyph for Control */ | ||
| 5095 | /* Set IT->ctl_chars[0] to the glyph for `^'. */ | 5096 | /* Set IT->ctl_chars[0] to the glyph for `^'. */ |
| 5096 | if (it->dp | 5097 | if (it->dp |
| 5097 | && INTEGERP (DISP_CTRL_GLYPH (it->dp)) | 5098 | && INTEGERP (DISP_CTRL_GLYPH (it->dp)) |
| @@ -5099,19 +5100,18 @@ get_next_display_element (it) | |||
| 5099 | { | 5100 | { |
| 5100 | g = XINT (DISP_CTRL_GLYPH (it->dp)); | 5101 | g = XINT (DISP_CTRL_GLYPH (it->dp)); |
| 5101 | lface_id = FAST_GLYPH_FACE (g); | 5102 | lface_id = FAST_GLYPH_FACE (g); |
| 5102 | if (lface_id) | 5103 | } |
| 5103 | { | 5104 | if (lface_id) |
| 5104 | g = FAST_GLYPH_CHAR (g); | 5105 | { |
| 5105 | face_id = merge_faces (it->f, Qt, lface_id, | 5106 | g = FAST_GLYPH_CHAR (g); |
| 5106 | it->face_id); | 5107 | face_id = merge_faces (it->f, Qt, lface_id, |
| 5107 | } | 5108 | it->face_id); |
| 5108 | } | 5109 | } |
| 5109 | else | 5110 | else |
| 5110 | { | 5111 | { |
| 5111 | /* Merge the escape-glyph face into the current face. */ | 5112 | /* Merge the escape-glyph face into the current face. */ |
| 5112 | face_id = merge_faces (it->f, Qescape_glyph, 0, | 5113 | face_id = merge_faces (it->f, Qescape_glyph, 0, |
| 5113 | it->face_id); | 5114 | it->face_id); |
| 5114 | g = '^'; | ||
| 5115 | } | 5115 | } |
| 5116 | 5116 | ||
| 5117 | XSETINT (it->ctl_chars[0], g); | 5117 | XSETINT (it->ctl_chars[0], g); |
| @@ -5121,25 +5121,25 @@ get_next_display_element (it) | |||
| 5121 | goto display_control; | 5121 | goto display_control; |
| 5122 | } | 5122 | } |
| 5123 | 5123 | ||
| 5124 | escape_glyph = '\\'; /* default for Octal display */ | ||
| 5124 | if (it->dp | 5125 | if (it->dp |
| 5125 | && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) | 5126 | && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) |
| 5126 | && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) | 5127 | && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) |
| 5127 | { | 5128 | { |
| 5128 | escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); | 5129 | escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); |
| 5129 | lface_id = FAST_GLYPH_FACE (escape_glyph); | 5130 | lface_id = FAST_GLYPH_FACE (escape_glyph); |
| 5130 | if (lface_id) | 5131 | } |
| 5131 | { | 5132 | if (lface_id) |
| 5132 | escape_glyph = FAST_GLYPH_CHAR (escape_glyph); | 5133 | { |
| 5133 | face_id = merge_faces (it->f, Qt, lface_id, | 5134 | escape_glyph = FAST_GLYPH_CHAR (escape_glyph); |
| 5134 | it->face_id); | 5135 | face_id = merge_faces (it->f, Qt, lface_id, |
| 5135 | } | 5136 | it->face_id); |
| 5136 | } | 5137 | } |
| 5137 | else | 5138 | else |
| 5138 | { | 5139 | { |
| 5139 | /* Merge the escape-glyph face into the current face. */ | 5140 | /* Merge the escape-glyph face into the current face. */ |
| 5140 | face_id = merge_faces (it->f, Qescape_glyph, 0, | 5141 | face_id = merge_faces (it->f, Qescape_glyph, 0, |
| 5141 | it->face_id); | 5142 | it->face_id); |
| 5142 | escape_glyph = '\\'; | ||
| 5143 | } | 5143 | } |
| 5144 | 5144 | ||
| 5145 | if (it->c == 0x8a0 || it->c == 0x8ad) | 5145 | if (it->c == 0x8a0 || it->c == 0x8ad) |