]> git.eshelyaron.com Git - emacs.git/commitdiff
(get_next_display_element): Alter previous change:
authorRichard M. Stallman <rms@gnu.org>
Wed, 8 Jun 2005 15:26:33 +0000 (15:26 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 8 Jun 2005 15:26:33 +0000 (15:26 +0000)
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.

src/ChangeLog
src/xdisp.c

index 003668db5600cf037205219e30e03752c56c1f94..cfbbe7b47c0202a39a8738373ca52fd2c155931d 100644 (file)
@@ -1,3 +1,18 @@
+2005-06-08  Richard M. Stallman  <rms@gnu.org>
+
+       * 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) <show-nonbreak-escape>: 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  <jet@gyve.org>
 
        * xdisp.c (note_mode_line_or_margin_highlight): Check
index 47421d13115f7f646182ce699702f9f04e621f5d..fb5b8fbe6f2f42acdffaf955102b46e425c92e8a 100644 (file)
@@ -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,