diff options
| author | Juri Linkov | 2005-06-06 12:36:29 +0000 |
|---|---|---|
| committer | Juri Linkov | 2005-06-06 12:36:29 +0000 |
| commit | 44e582b843ef057c07d89dfa5485fd9814caa0d1 (patch) | |
| tree | 2e1866d661201f21523b31aadd97c1e8b4a8c644 /src | |
| parent | e6ca43c89eb9793471f5fa020df7efb41836e584 (diff) | |
| download | emacs-44e582b843ef057c07d89dfa5485fd9814caa0d1.tar.gz emacs-44e582b843ef057c07d89dfa5485fd9814caa0d1.zip | |
(Qno_break_space): New variable.
(syms_of_xdisp): Initialize it.
(get_next_display_element): Add no-break space and soft hypen
codes for iso8859-2 and iso8859-5. Don't add `\' for them.
Use `no-break-space' face for no-break spaces.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 63af22d9112..c1ea2a9389a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -350,6 +350,10 @@ Lisp_Object Qtrailing_whitespace; | |||
| 350 | 350 | ||
| 351 | Lisp_Object Qescape_glyph; | 351 | Lisp_Object Qescape_glyph; |
| 352 | 352 | ||
| 353 | /* Name and number of the face used to highlight non-breaking spaces. */ | ||
| 354 | |||
| 355 | Lisp_Object Qno_break_space; | ||
| 356 | |||
| 353 | /* The symbol `image' which is the car of the lists used to represent | 357 | /* The symbol `image' which is the car of the lists used to represent |
| 354 | images in Lisp. */ | 358 | images in Lisp. */ |
| 355 | 359 | ||
| @@ -5094,8 +5098,10 @@ get_next_display_element (it) | |||
| 5094 | && it->len == 1) | 5098 | && it->len == 1) |
| 5095 | || !CHAR_PRINTABLE_P (it->c) | 5099 | || !CHAR_PRINTABLE_P (it->c) |
| 5096 | || (!NILP (Vshow_nonbreak_escape) | 5100 | || (!NILP (Vshow_nonbreak_escape) |
| 5097 | && (it->c == 0x8ad || it->c == 0x8a0 | 5101 | && (it->c == 0x8a0 || it->c == 0x8ad |
| 5098 | || it->c == 0xf2d || it->c == 0xf20))) | 5102 | || it->c == 0x920 || it->c == 0x92d |
| 5103 | || it->c == 0xe20 || it->c == 0xe2d | ||
| 5104 | || it->c == 0xf20 || it->c == 0xf2d))) | ||
| 5099 | : (it->c >= 127 | 5105 | : (it->c >= 127 |
| 5100 | && (!unibyte_display_via_language_environment | 5106 | && (!unibyte_display_via_language_environment |
| 5101 | || it->c == unibyte_char_to_multibyte (it->c))))) | 5107 | || it->c == unibyte_char_to_multibyte (it->c))))) |
| @@ -5162,13 +5168,25 @@ get_next_display_element (it) | |||
| 5162 | it->face_id); | 5168 | it->face_id); |
| 5163 | } | 5169 | } |
| 5164 | 5170 | ||
| 5165 | if (it->c == 0x8a0 || it->c == 0x8ad | 5171 | if (it->c == 0x8a0 || it->c == 0x920 |
| 5166 | || it->c == 0xf20 || it->c == 0xf2d) | 5172 | || it->c == 0xe20 || it->c == 0xf20) |
| 5167 | { | 5173 | { |
| 5168 | XSETINT (it->ctl_chars[0], escape_glyph); | 5174 | /* Merge the no-break-space face into the current face. */ |
| 5175 | face_id = merge_faces (it->f, Qno_break_space, 0, | ||
| 5176 | it->face_id); | ||
| 5177 | |||
| 5169 | g = it->c; | 5178 | g = it->c; |
| 5170 | XSETINT (it->ctl_chars[1], g); | 5179 | XSETINT (it->ctl_chars[0], g); |
| 5171 | ctl_len = 2; | 5180 | ctl_len = 1; |
| 5181 | goto display_control; | ||
| 5182 | } | ||
| 5183 | |||
| 5184 | if (it->c == 0x8ad || it->c == 0x92d | ||
| 5185 | || it->c == 0xe2d || it->c == 0xf2d) | ||
| 5186 | { | ||
| 5187 | g = it->c; | ||
| 5188 | XSETINT (it->ctl_chars[0], g); | ||
| 5189 | ctl_len = 1; | ||
| 5172 | goto display_control; | 5190 | goto display_control; |
| 5173 | } | 5191 | } |
| 5174 | 5192 | ||
| @@ -22714,6 +22732,8 @@ syms_of_xdisp () | |||
| 22714 | staticpro (&Qtrailing_whitespace); | 22732 | staticpro (&Qtrailing_whitespace); |
| 22715 | Qescape_glyph = intern ("escape-glyph"); | 22733 | Qescape_glyph = intern ("escape-glyph"); |
| 22716 | staticpro (&Qescape_glyph); | 22734 | staticpro (&Qescape_glyph); |
| 22735 | Qno_break_space = intern ("no-break-space"); | ||
| 22736 | staticpro (&Qno_break_space); | ||
| 22717 | Qimage = intern ("image"); | 22737 | Qimage = intern ("image"); |
| 22718 | staticpro (&Qimage); | 22738 | staticpro (&Qimage); |
| 22719 | QCmap = intern (":map"); | 22739 | QCmap = intern (":map"); |