]> code.delx.au - gnu-emacs/blobdiff - src/xdisp.c
(get_next_display_element):
[gnu-emacs] / src / xdisp.c
index 3a44cc808c027148cd57d3c6f5dc0af22f53c4db..1bb2b4292c02f27b23e752c80068fe6386a7901b 100644 (file)
@@ -320,7 +320,7 @@ Lisp_Object Vshow_trailing_whitespace;
 
 /* Non-nil means escape non-break space and hyphens.  */
 
-Lisp_Object Vshow_nonbreak_escape;
+Lisp_Object Vnobreak_char_display;
 
 #ifdef HAVE_WINDOW_SYSTEM
 extern Lisp_Object Voverflow_newline_into_fringe;
@@ -352,7 +352,7 @@ Lisp_Object Qescape_glyph;
 
 /* Name and number of the face used to highlight non-breaking spaces.  */
 
-Lisp_Object Qno_break_space;
+Lisp_Object Qnobreak_space;
 
 /* The symbol `image' which is the car of the lists used to represent
    images in Lisp.  */
@@ -1898,7 +1898,7 @@ get_phys_cursor_geometry (w, row, glyph, heightp)
      int *heightp;
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
-  int x, y, wd, h, h0, y0;
+  int y, wd, h, h0, y0;
 
   /* Compute the width of the rectangle to draw.  If on a stretch
      glyph, and `x-stretch-block-cursor' is nil, don't draw a
@@ -5097,7 +5097,7 @@ get_next_display_element (it)
                       ? ((it->c >= 127
                           && it->len == 1)
                          || !CHAR_PRINTABLE_P (it->c)
-                         || (!NILP (Vshow_nonbreak_escape)
+                         || (!NILP (Vnobreak_char_display)
                              && (it->c == 0x8a0 || it->c == 0x8ad
                                  || it->c == 0x920 || it->c == 0x92d
                                  || it->c == 0xe20 || it->c == 0xe2d
@@ -5152,12 +5152,12 @@ get_next_display_element (it)
              /* Handle non-break space in the mode where it only gets
                 highlighting.  */
 
-             if (! EQ (Vshow_nonbreak_escape, Qt)
+             if (EQ (Vnobreak_char_display, 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,
+                 face_id = merge_faces (it->f, Qnobreak_space, 0,
                                         it->face_id);
 
                  g = it->c = ' ';
@@ -5196,7 +5196,7 @@ get_next_display_element (it)
              /* Handle soft hyphens in the mode where they only get
                 highlighting.  */
 
-             if (! EQ (Vshow_nonbreak_escape, Qt)
+             if (EQ (Vnobreak_char_display, Qt)
                  && (it->c == 0x8ad || it->c == 0x92d
                      || it->c == 0xe2d || it->c == 0xf2d))
                {
@@ -8252,7 +8252,6 @@ static Lisp_Object
 format_mode_line_unwind_data (obuf)
      struct buffer *obuf;
 {
-  int i = 0;
   Lisp_Object vector;
 
   /* Reduce consing by keeping one vector in
@@ -19201,7 +19200,7 @@ get_line_height_property (it, prop)
      struct it *it;
      Lisp_Object prop;
 {
-  Lisp_Object position, val;
+  Lisp_Object position;
 
   if (STRINGP (it->object))
     position = make_number (IT_STRING_CHARPOS (*it));
@@ -19552,7 +19551,6 @@ x_produce_glyphs (it)
          else
            {
              Lisp_Object spacing;
-             int total = 0;
 
              it->phys_ascent = it->ascent;
              it->phys_descent = it->descent;
@@ -21523,7 +21521,7 @@ note_mode_line_or_margin_highlight (window, x, y, area)
          int ignore;
 
          int vpos, hpos;
-         
+
          b = Fprevious_single_property_change (make_number (charpos + 1),
                                                Qmouse_face, string, Qnil);
          if (NILP (b))
@@ -21571,18 +21569,18 @@ note_mode_line_or_margin_highlight (window, x, y, area)
          hpos = (area == ON_MODE_LINE
                  ? (w->current_matrix)->nrows - 1
                  : 0);
-         
+
          /* If the re-rendering position is included in the last
             re-rendering area, we should do nothing. */
-         if ( window == dpyinfo->mouse_face_window
+         if ( EQ (window, dpyinfo->mouse_face_window)
               && dpyinfo->mouse_face_beg_col <= vpos
               && vpos < dpyinfo->mouse_face_end_col
               && dpyinfo->mouse_face_beg_row == hpos )
            return;
-         
+
          if (clear_mouse_face (dpyinfo))
            cursor = No_Cursor;
-         
+
          dpyinfo->mouse_face_beg_col = vpos;
          dpyinfo->mouse_face_beg_row = hpos;
 
@@ -21607,8 +21605,9 @@ note_mode_line_or_margin_highlight (window, x, y, area)
          if (NILP (pointer))
            pointer = Qhand;
        }
+      else if ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE))
+       clear_mouse_face (dpyinfo);
     }
-
   define_frame_cursor1 (f, cursor, pointer);
 }
 
@@ -22777,8 +22776,8 @@ syms_of_xdisp ()
   staticpro (&Qtrailing_whitespace);
   Qescape_glyph = intern ("escape-glyph");
   staticpro (&Qescape_glyph);
-  Qno_break_space = intern ("no-break-space");
-  staticpro (&Qno_break_space);
+  Qnobreak_space = intern ("nobreak-space");
+  staticpro (&Qnobreak_space);
   Qimage = intern ("image");
   staticpro (&Qimage);
   QCmap = intern (":map");
@@ -22884,13 +22883,14 @@ wide as that tab on the display.  */);
 The face used for trailing whitespace is `trailing-whitespace'.  */);
   Vshow_trailing_whitespace = Qnil;
 
-  DEFVAR_LISP ("show-nonbreak-escape", &Vshow_nonbreak_escape,
-    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'.
+  DEFVAR_LISP ("nobreak-char-display", &Vnobreak_char_display,
+    doc: /* *Control highlighting of nobreak space and soft hyphen.
+t means highlight the character itself (for nobreak space,
+use face `nobreak-space'.
 nil means no highlighting.
-other values mean display the escape glyph before the character.  */);
-  Vshow_nonbreak_escape = Qt;
+other values mean display the escape glyph followed by an ordinary
+space or ordinary hyphen.  */);
+  Vnobreak_char_display = Qt;
 
   DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer,
     doc: /* *The pointer shape to show in void text areas.