From: Richard M. Stallman Date: Wed, 8 Jun 2005 15:26:33 +0000 (+0000) Subject: (get_next_display_element): Alter previous change: X-Git-Tag: emacs-pretest-22.0.90~9205 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=547d2b37972e31e448d85c0b99e64a3e42b4f5ba;p=emacs.git (get_next_display_element): Alter previous change: Distinguish Vshow_nonbreak_escape = t or not t. For t, use escape_glyph once again, as before previous change. Use space or hyphen for display, instead of the non-ASCII char. (syms_of_xdisp) : Doc fix. --- diff --git a/src/ChangeLog b/src/ChangeLog index 003668db560..cfbbe7b47c0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2005-06-08 Richard M. Stallman + + * xdisp.c (get_next_display_element): Alter previous change: + Distinguish Vshow_nonbreak_escape = t or not t. + For t, use escape_glyph once again, as before previous change. + Use space or hyphen for display, instead of the non-ASCII char. + (syms_of_xdisp) : Doc fix. + + * process.c (Fstart_process): Don't touch command_channel_p slot. + + * process.h (struct process): Conditionalize slots + adaptive_read_buffering, read_output_delay and read_output_skip + on ADAPTIVE_READ_BUFFERING. + Delete command_channel_p. + 2005-06-07 Masatake YAMATO * xdisp.c (note_mode_line_or_margin_highlight): Check diff --git a/src/xdisp.c b/src/xdisp.c index 47421d13115..fb5b8fbe6f2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5116,6 +5116,8 @@ get_next_display_element (it) int face_id, lface_id = 0 ; GLYPH escape_glyph; + /* Handle control characters with ^. */ + if (it->c < 128 && it->ctl_arrow_p) { g = '^'; /* default glyph for Control */ @@ -5147,7 +5149,28 @@ get_next_display_element (it) goto display_control; } - escape_glyph = '\\'; /* default for Octal display */ + /* Handle non-break space in the mode where it only gets + highlighting. */ + + if (! EQ (Vshow_nonbreak_escape, Qt) + && (it->c == 0x8a0 || it->c == 0x920 + || it->c == 0xe20 || it->c == 0xf20)) + { + /* Merge the no-break-space face into the current face. */ + face_id = merge_faces (it->f, Qno_break_space, 0, + it->face_id); + + g = it->c = ' '; + XSETINT (it->ctl_chars[0], g); + ctl_len = 1; + goto display_control; + } + + /* Handle sequences that start with the "escape glyph". */ + + /* the default escape glyph is \. */ + escape_glyph = '\\'; + if (it->dp && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) @@ -5157,6 +5180,8 @@ get_next_display_element (it) } if (lface_id) { + /* The display table specified a face. + Merge it into face_id and also into escape_glyph. */ escape_glyph = FAST_GLYPH_CHAR (escape_glyph); face_id = merge_faces (it->f, Qt, lface_id, it->face_id); @@ -5168,25 +5193,31 @@ get_next_display_element (it) it->face_id); } - if (it->c == 0x8a0 || it->c == 0x920 - || it->c == 0xe20 || it->c == 0xf20) - { - /* Merge the no-break-space face into the current face. */ - face_id = merge_faces (it->f, Qno_break_space, 0, - it->face_id); + /* Handle soft hyphens in the mode where they only get + highlighting. */ - g = it->c; + if (! EQ (Vshow_nonbreak_escape, Qt) + && (it->c == 0x8ad || it->c == 0x92d + || it->c == 0xe2d || it->c == 0xf2d)) + { + g = it->c = '-'; XSETINT (it->ctl_chars[0], g); ctl_len = 1; goto display_control; } - if (it->c == 0x8ad || it->c == 0x92d - || it->c == 0xe2d || it->c == 0xf2d) + /* Handle non-break space and soft hyphen + with the escape glyph. */ + + if (it->c == 0x8a0 || it->c == 0x8ad + || it->c == 0x920 || it->c == 0x92d + || it->c == 0xe20 || it->c == 0xe2d + || it->c == 0xf20 || it->c == 0xf2d) { - g = it->c; - XSETINT (it->ctl_chars[0], g); - ctl_len = 1; + XSETINT (it->ctl_chars[0], escape_glyph); + g = it->c = ((it->c & 0xf) == 0 ? ' ' : '-'); + XSETINT (it->ctl_chars[1], g); + ctl_len = 2; goto display_control; } @@ -22854,7 +22885,11 @@ The face used for trailing whitespace is `trailing-whitespace'. */); Vshow_trailing_whitespace = Qnil; DEFVAR_LISP ("show-nonbreak-escape", &Vshow_nonbreak_escape, - doc: /* *Non-nil means display escape character before non-break space and hyphen. */); + doc: /* *Control highlighting of non-break space and soft hyphen. +t means highlight the character itself (for non-break space, +use face `non-break-space'. +nil means no highlighting. +other values mean display the escape glyph before the character. */); Vshow_nonbreak_escape = Qt; DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer,