comparison src/xdisp.c @ 63061:ac2e43626d90

(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.
author Juri Linkov <juri@jurta.org>
date Mon, 06 Jun 2005 12:36:29 +0000
parents 6ab08ae41502
children 9698305b2fc0
comparison
equal deleted inserted replaced
63060:1fd49ae230dd 63061:ac2e43626d90
347 Lisp_Object Qtrailing_whitespace; 347 Lisp_Object Qtrailing_whitespace;
348 348
349 /* Name and number of the face used to highlight escape glyphs. */ 349 /* Name and number of the face used to highlight escape glyphs. */
350 350
351 Lisp_Object Qescape_glyph; 351 Lisp_Object Qescape_glyph;
352
353 /* Name and number of the face used to highlight non-breaking spaces. */
354
355 Lisp_Object Qno_break_space;
352 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
356 Lisp_Object Qimage; 360 Lisp_Object Qimage;
5092 || (it->multibyte_p 5096 || (it->multibyte_p
5093 ? ((it->c >= 127 5097 ? ((it->c >= 127
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)))))
5102 { 5108 {
5103 /* IT->c is a control character which must be displayed 5109 /* IT->c is a control character which must be displayed
5160 /* Merge the escape-glyph face into the current face. */ 5166 /* Merge the escape-glyph face into the current face. */
5161 face_id = merge_faces (it->f, Qescape_glyph, 0, 5167 face_id = merge_faces (it->f, Qescape_glyph, 0,
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
5175 { 5193 {
5176 unsigned char str[MAX_MULTIBYTE_LENGTH]; 5194 unsigned char str[MAX_MULTIBYTE_LENGTH];
22712 staticpro (&Qfontification_functions); 22730 staticpro (&Qfontification_functions);
22713 Qtrailing_whitespace = intern ("trailing-whitespace"); 22731 Qtrailing_whitespace = intern ("trailing-whitespace");
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");
22720 staticpro (&QCmap); 22740 staticpro (&QCmap);
22721 QCpointer = intern (":pointer"); 22741 QCpointer = intern (":pointer");