diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 4f33c0d518a..d0ff95257ce 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -7080,6 +7080,19 @@ get_next_display_element (struct it *it) | |||
| 7080 | goto display_control; | 7080 | goto display_control; |
| 7081 | } | 7081 | } |
| 7082 | 7082 | ||
| 7083 | /* Handle non-ascii hyphens in the mode where it only | ||
| 7084 | gets highlighting. */ | ||
| 7085 | |||
| 7086 | if (nonascii_hyphen_p && EQ (Vnobreak_char_display, Qt)) | ||
| 7087 | { | ||
| 7088 | /* Merge `nobreak-space' into the current face. */ | ||
| 7089 | face_id = merge_faces (it->f, Qnobreak_hyphen, 0, | ||
| 7090 | it->face_id); | ||
| 7091 | XSETINT (it->ctl_chars[0], '-'); | ||
| 7092 | ctl_len = 1; | ||
| 7093 | goto display_control; | ||
| 7094 | } | ||
| 7095 | |||
| 7083 | /* Handle sequences that start with the "escape glyph". */ | 7096 | /* Handle sequences that start with the "escape glyph". */ |
| 7084 | 7097 | ||
| 7085 | /* the default escape glyph is \. */ | 7098 | /* the default escape glyph is \. */ |
| @@ -7096,15 +7109,6 @@ get_next_display_element (struct it *it) | |||
| 7096 | ? merge_faces (it->f, Qt, lface_id, it->face_id) | 7109 | ? merge_faces (it->f, Qt, lface_id, it->face_id) |
| 7097 | : merge_escape_glyph_face (it)); | 7110 | : merge_escape_glyph_face (it)); |
| 7098 | 7111 | ||
| 7099 | /* Draw non-ASCII hyphen with just highlighting: */ | ||
| 7100 | |||
| 7101 | if (nonascii_hyphen_p && EQ (Vnobreak_char_display, Qt)) | ||
| 7102 | { | ||
| 7103 | XSETINT (it->ctl_chars[0], '-'); | ||
| 7104 | ctl_len = 1; | ||
| 7105 | goto display_control; | ||
| 7106 | } | ||
| 7107 | |||
| 7108 | /* Draw non-ASCII space/hyphen with escape glyph: */ | 7112 | /* Draw non-ASCII space/hyphen with escape glyph: */ |
| 7109 | 7113 | ||
| 7110 | if (nonascii_space_p || nonascii_hyphen_p) | 7114 | if (nonascii_space_p || nonascii_hyphen_p) |
| @@ -31198,8 +31202,10 @@ They are still logged to the *Messages* buffer. */); | |||
| 31198 | /* Name and number of the face used to highlight escape glyphs. */ | 31202 | /* Name and number of the face used to highlight escape glyphs. */ |
| 31199 | DEFSYM (Qescape_glyph, "escape-glyph"); | 31203 | DEFSYM (Qescape_glyph, "escape-glyph"); |
| 31200 | 31204 | ||
| 31201 | /* Name and number of the face used to highlight non-breaking spaces. */ | 31205 | /* Name and number of the face used to highlight non-breaking |
| 31206 | spaces/hyphens. */ | ||
| 31202 | DEFSYM (Qnobreak_space, "nobreak-space"); | 31207 | DEFSYM (Qnobreak_space, "nobreak-space"); |
| 31208 | DEFSYM (Qnobreak_hyphen, "nobreak-hyphen"); | ||
| 31203 | 31209 | ||
| 31204 | /* The symbol 'image' which is the car of the lists used to represent | 31210 | /* The symbol 'image' which is the car of the lists used to represent |
| 31205 | images in Lisp. Also a tool bar style. */ | 31211 | images in Lisp. Also a tool bar style. */ |
| @@ -31311,7 +31317,7 @@ The face used for trailing whitespace is `trailing-whitespace'. */); | |||
| 31311 | doc: /* Control highlighting of non-ASCII space and hyphen chars. | 31317 | doc: /* Control highlighting of non-ASCII space and hyphen chars. |
| 31312 | If the value is t, Emacs highlights non-ASCII chars which have the | 31318 | If the value is t, Emacs highlights non-ASCII chars which have the |
| 31313 | same appearance as an ASCII space or hyphen, using the `nobreak-space' | 31319 | same appearance as an ASCII space or hyphen, using the `nobreak-space' |
| 31314 | or `escape-glyph' face respectively. | 31320 | or `nobreak-hyphen' face respectively. |
| 31315 | 31321 | ||
| 31316 | U+00A0 (no-break space), U+00AD (soft hyphen), U+2010 (hyphen), and | 31322 | U+00A0 (no-break space), U+00AD (soft hyphen), U+2010 (hyphen), and |
| 31317 | U+2011 (non-breaking hyphen) are affected. | 31323 | U+2011 (non-breaking hyphen) are affected. |