Mercurial > emacs
comparison src/xdisp.c @ 63720:10d4557c5555
(get_next_display_element):
Finish reversing the tests of Vnobreak_char_display.
(Vnobreak_char_display): Renamed from Vshow_nonbreak_escape.
All uses changed.
(Qnobreak_space): Renamed from Qno_break_space. All uses changed.
(syms_of_xdisp): Define nobreak-char-display and nobreak-space.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 23 Jun 2005 21:32:26 +0000 |
parents | 0691dbaf122b |
children | 5ad1c51928d3 d07fdd5d7d4e b7da78284d4c |
comparison
equal
deleted
inserted
replaced
63719:c3da886cec72 | 63720:10d4557c5555 |
---|---|
318 | 318 |
319 Lisp_Object Vshow_trailing_whitespace; | 319 Lisp_Object Vshow_trailing_whitespace; |
320 | 320 |
321 /* Non-nil means escape non-break space and hyphens. */ | 321 /* Non-nil means escape non-break space and hyphens. */ |
322 | 322 |
323 Lisp_Object Vshow_nonbreak_escape; | 323 Lisp_Object Vnobreak_char_display; |
324 | 324 |
325 #ifdef HAVE_WINDOW_SYSTEM | 325 #ifdef HAVE_WINDOW_SYSTEM |
326 extern Lisp_Object Voverflow_newline_into_fringe; | 326 extern Lisp_Object Voverflow_newline_into_fringe; |
327 | 327 |
328 /* Test if overflow newline into fringe. Called with iterator IT | 328 /* Test if overflow newline into fringe. Called with iterator IT |
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. */ | 353 /* Name and number of the face used to highlight non-breaking spaces. */ |
354 | 354 |
355 Lisp_Object Qno_break_space; | 355 Lisp_Object Qnobreak_space; |
356 | 356 |
357 /* 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 |
358 images in Lisp. */ | 358 images in Lisp. */ |
359 | 359 |
360 Lisp_Object Qimage; | 360 Lisp_Object Qimage; |
5095 || (it->c != '\n' && it->c != '\t'))) | 5095 || (it->c != '\n' && it->c != '\t'))) |
5096 || (it->multibyte_p | 5096 || (it->multibyte_p |
5097 ? ((it->c >= 127 | 5097 ? ((it->c >= 127 |
5098 && it->len == 1) | 5098 && it->len == 1) |
5099 || !CHAR_PRINTABLE_P (it->c) | 5099 || !CHAR_PRINTABLE_P (it->c) |
5100 || (!NILP (Vshow_nonbreak_escape) | 5100 || (!NILP (Vnobreak_char_display) |
5101 && (it->c == 0x8a0 || it->c == 0x8ad | 5101 && (it->c == 0x8a0 || it->c == 0x8ad |
5102 || it->c == 0x920 || it->c == 0x92d | 5102 || it->c == 0x920 || it->c == 0x92d |
5103 || it->c == 0xe20 || it->c == 0xe2d | 5103 || it->c == 0xe20 || it->c == 0xe2d |
5104 || it->c == 0xf20 || it->c == 0xf2d))) | 5104 || it->c == 0xf20 || it->c == 0xf2d))) |
5105 : (it->c >= 127 | 5105 : (it->c >= 127 |
5150 } | 5150 } |
5151 | 5151 |
5152 /* Handle non-break space in the mode where it only gets | 5152 /* Handle non-break space in the mode where it only gets |
5153 highlighting. */ | 5153 highlighting. */ |
5154 | 5154 |
5155 if (EQ (Vshow_nonbreak_escape, Qt) | 5155 if (EQ (Vnobreak_char_display, Qt) |
5156 && (it->c == 0x8a0 || it->c == 0x920 | 5156 && (it->c == 0x8a0 || it->c == 0x920 |
5157 || it->c == 0xe20 || it->c == 0xf20)) | 5157 || it->c == 0xe20 || it->c == 0xf20)) |
5158 { | 5158 { |
5159 /* Merge the no-break-space face into the current face. */ | 5159 /* Merge the no-break-space face into the current face. */ |
5160 face_id = merge_faces (it->f, Qno_break_space, 0, | 5160 face_id = merge_faces (it->f, Qnobreak_space, 0, |
5161 it->face_id); | 5161 it->face_id); |
5162 | 5162 |
5163 g = it->c = ' '; | 5163 g = it->c = ' '; |
5164 XSETINT (it->ctl_chars[0], g); | 5164 XSETINT (it->ctl_chars[0], g); |
5165 ctl_len = 1; | 5165 ctl_len = 1; |
5194 } | 5194 } |
5195 | 5195 |
5196 /* Handle soft hyphens in the mode where they only get | 5196 /* Handle soft hyphens in the mode where they only get |
5197 highlighting. */ | 5197 highlighting. */ |
5198 | 5198 |
5199 if (! EQ (Vshow_nonbreak_escape, Qt) | 5199 if (EQ (Vnobreak_char_display, Qt) |
5200 && (it->c == 0x8ad || it->c == 0x92d | 5200 && (it->c == 0x8ad || it->c == 0x92d |
5201 || it->c == 0xe2d || it->c == 0xf2d)) | 5201 || it->c == 0xe2d || it->c == 0xf2d)) |
5202 { | 5202 { |
5203 g = it->c = '-'; | 5203 g = it->c = '-'; |
5204 XSETINT (it->ctl_chars[0], g); | 5204 XSETINT (it->ctl_chars[0], g); |
22774 staticpro (&Qfontification_functions); | 22774 staticpro (&Qfontification_functions); |
22775 Qtrailing_whitespace = intern ("trailing-whitespace"); | 22775 Qtrailing_whitespace = intern ("trailing-whitespace"); |
22776 staticpro (&Qtrailing_whitespace); | 22776 staticpro (&Qtrailing_whitespace); |
22777 Qescape_glyph = intern ("escape-glyph"); | 22777 Qescape_glyph = intern ("escape-glyph"); |
22778 staticpro (&Qescape_glyph); | 22778 staticpro (&Qescape_glyph); |
22779 Qno_break_space = intern ("no-break-space"); | 22779 Qnobreak_space = intern ("nobreak-space"); |
22780 staticpro (&Qno_break_space); | 22780 staticpro (&Qnobreak_space); |
22781 Qimage = intern ("image"); | 22781 Qimage = intern ("image"); |
22782 staticpro (&Qimage); | 22782 staticpro (&Qimage); |
22783 QCmap = intern (":map"); | 22783 QCmap = intern (":map"); |
22784 staticpro (&QCmap); | 22784 staticpro (&QCmap); |
22785 QCpointer = intern (":pointer"); | 22785 QCpointer = intern (":pointer"); |
22881 DEFVAR_LISP ("show-trailing-whitespace", &Vshow_trailing_whitespace, | 22881 DEFVAR_LISP ("show-trailing-whitespace", &Vshow_trailing_whitespace, |
22882 doc: /* *Non-nil means highlight trailing whitespace. | 22882 doc: /* *Non-nil means highlight trailing whitespace. |
22883 The face used for trailing whitespace is `trailing-whitespace'. */); | 22883 The face used for trailing whitespace is `trailing-whitespace'. */); |
22884 Vshow_trailing_whitespace = Qnil; | 22884 Vshow_trailing_whitespace = Qnil; |
22885 | 22885 |
22886 DEFVAR_LISP ("show-nonbreak-escape", &Vshow_nonbreak_escape, | 22886 DEFVAR_LISP ("nobreak-char-display", &Vnobreak_char_display, |
22887 doc: /* *Control highlighting of non-break space and soft hyphen. | 22887 doc: /* *Control highlighting of nobreak space and soft hyphen. |
22888 t means highlight the character itself (for non-break space, | 22888 t means highlight the character itself (for nobreak space, |
22889 use face `non-break-space'. | 22889 use face `nobreak-space'. |
22890 nil means no highlighting. | 22890 nil means no highlighting. |
22891 other values mean display the escape glyph before the character. */); | 22891 other values mean display the escape glyph followed by an ordinary |
22892 Vshow_nonbreak_escape = Qt; | 22892 space or ordinary hyphen. */); |
22893 Vnobreak_char_display = Qt; | |
22893 | 22894 |
22894 DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, | 22895 DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, |
22895 doc: /* *The pointer shape to show in void text areas. | 22896 doc: /* *The pointer shape to show in void text areas. |
22896 Nil means to show the text pointer. Other options are `arrow', `text', | 22897 Nil means to show the text pointer. Other options are `arrow', `text', |
22897 `hand', `vdrag', `hdrag', `modeline', and `hourglass'. */); | 22898 `hand', `vdrag', `hdrag', `modeline', and `hourglass'. */); |