aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2005-06-08 15:26:33 +0000
committerRichard M. Stallman2005-06-08 15:26:33 +0000
commit547d2b37972e31e448d85c0b99e64a3e42b4f5ba (patch)
tree0e35a7d39f8bf07ba3054942e2c440483bbc55b5 /src
parent9d138659971d8f027fe1e203e23b885f00cb8c25 (diff)
downloademacs-547d2b37972e31e448d85c0b99e64a3e42b4f5ba.tar.gz
emacs-547d2b37972e31e448d85c0b99e64a3e42b4f5ba.zip
(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) <show-nonbreak-escape>: Doc fix.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog15
-rw-r--r--src/xdisp.c63
2 files changed, 64 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 003668db560..cfbbe7b47c0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,18 @@
12005-06-08 Richard M. Stallman <rms@gnu.org>
2
3 * xdisp.c (get_next_display_element): Alter previous change:
4 Distinguish Vshow_nonbreak_escape = t or not t.
5 For t, use escape_glyph once again, as before previous change.
6 Use space or hyphen for display, instead of the non-ASCII char.
7 (syms_of_xdisp) <show-nonbreak-escape>: Doc fix.
8
9 * process.c (Fstart_process): Don't touch command_channel_p slot.
10
11 * process.h (struct process): Conditionalize slots
12 adaptive_read_buffering, read_output_delay and read_output_skip
13 on ADAPTIVE_READ_BUFFERING.
14 Delete command_channel_p.
15
12005-06-07 Masatake YAMATO <jet@gyve.org> 162005-06-07 Masatake YAMATO <jet@gyve.org>
2 17
3 * xdisp.c (note_mode_line_or_margin_highlight): Check 18 * 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)
5116 int face_id, lface_id = 0 ; 5116 int face_id, lface_id = 0 ;
5117 GLYPH escape_glyph; 5117 GLYPH escape_glyph;
5118 5118
5119 /* Handle control characters with ^. */
5120
5119 if (it->c < 128 && it->ctl_arrow_p) 5121 if (it->c < 128 && it->ctl_arrow_p)
5120 { 5122 {
5121 g = '^'; /* default glyph for Control */ 5123 g = '^'; /* default glyph for Control */
@@ -5147,7 +5149,28 @@ get_next_display_element (it)
5147 goto display_control; 5149 goto display_control;
5148 } 5150 }
5149 5151
5150 escape_glyph = '\\'; /* default for Octal display */ 5152 /* Handle non-break space in the mode where it only gets
5153 highlighting. */
5154
5155 if (! EQ (Vshow_nonbreak_escape, Qt)
5156 && (it->c == 0x8a0 || it->c == 0x920
5157 || it->c == 0xe20 || it->c == 0xf20))
5158 {
5159 /* Merge the no-break-space face into the current face. */
5160 face_id = merge_faces (it->f, Qno_break_space, 0,
5161 it->face_id);
5162
5163 g = it->c = ' ';
5164 XSETINT (it->ctl_chars[0], g);
5165 ctl_len = 1;
5166 goto display_control;
5167 }
5168
5169 /* Handle sequences that start with the "escape glyph". */
5170
5171 /* the default escape glyph is \. */
5172 escape_glyph = '\\';
5173
5151 if (it->dp 5174 if (it->dp
5152 && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) 5175 && INTEGERP (DISP_ESCAPE_GLYPH (it->dp))
5153 && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) 5176 && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp))))
@@ -5157,6 +5180,8 @@ get_next_display_element (it)
5157 } 5180 }
5158 if (lface_id) 5181 if (lface_id)
5159 { 5182 {
5183 /* The display table specified a face.
5184 Merge it into face_id and also into escape_glyph. */
5160 escape_glyph = FAST_GLYPH_CHAR (escape_glyph); 5185 escape_glyph = FAST_GLYPH_CHAR (escape_glyph);
5161 face_id = merge_faces (it->f, Qt, lface_id, 5186 face_id = merge_faces (it->f, Qt, lface_id,
5162 it->face_id); 5187 it->face_id);
@@ -5168,25 +5193,31 @@ get_next_display_element (it)
5168 it->face_id); 5193 it->face_id);
5169 } 5194 }
5170 5195
5171 if (it->c == 0x8a0 || it->c == 0x920 5196 /* Handle soft hyphens in the mode where they only get
5172 || it->c == 0xe20 || it->c == 0xf20) 5197 highlighting. */
5173 {
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 5198
5178 g = it->c; 5199 if (! EQ (Vshow_nonbreak_escape, Qt)
5200 && (it->c == 0x8ad || it->c == 0x92d
5201 || it->c == 0xe2d || it->c == 0xf2d))
5202 {
5203 g = it->c = '-';
5179 XSETINT (it->ctl_chars[0], g); 5204 XSETINT (it->ctl_chars[0], g);
5180 ctl_len = 1; 5205 ctl_len = 1;
5181 goto display_control; 5206 goto display_control;
5182 } 5207 }
5183 5208
5184 if (it->c == 0x8ad || it->c == 0x92d 5209 /* Handle non-break space and soft hyphen
5185 || it->c == 0xe2d || it->c == 0xf2d) 5210 with the escape glyph. */
5211
5212 if (it->c == 0x8a0 || it->c == 0x8ad
5213 || it->c == 0x920 || it->c == 0x92d
5214 || it->c == 0xe20 || it->c == 0xe2d
5215 || it->c == 0xf20 || it->c == 0xf2d)
5186 { 5216 {
5187 g = it->c; 5217 XSETINT (it->ctl_chars[0], escape_glyph);
5188 XSETINT (it->ctl_chars[0], g); 5218 g = it->c = ((it->c & 0xf) == 0 ? ' ' : '-');
5189 ctl_len = 1; 5219 XSETINT (it->ctl_chars[1], g);
5220 ctl_len = 2;
5190 goto display_control; 5221 goto display_control;
5191 } 5222 }
5192 5223
@@ -22854,7 +22885,11 @@ The face used for trailing whitespace is `trailing-whitespace'. */);
22854 Vshow_trailing_whitespace = Qnil; 22885 Vshow_trailing_whitespace = Qnil;
22855 22886
22856 DEFVAR_LISP ("show-nonbreak-escape", &Vshow_nonbreak_escape, 22887 DEFVAR_LISP ("show-nonbreak-escape", &Vshow_nonbreak_escape,
22857 doc: /* *Non-nil means display escape character before non-break space and hyphen. */); 22888 doc: /* *Control highlighting of non-break space and soft hyphen.
22889t means highlight the character itself (for non-break space,
22890use face `non-break-space'.
22891nil means no highlighting.
22892other values mean display the escape glyph before the character. */);
22858 Vshow_nonbreak_escape = Qt; 22893 Vshow_nonbreak_escape = Qt;
22859 22894
22860 DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, 22895 DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer,