]> code.delx.au - gnu-emacs/blobdiff - src/msdos.c
Document what does mouse-3 do on the mode line if there's only one window.
[gnu-emacs] / src / msdos.c
index 85ff6dd94a625e08d9bf79d84bc65ec563609be3..6312d5dc2c077e796459eedfee0323cc6e947db7 100644 (file)
@@ -195,8 +195,15 @@ them.  This happens with wheeled mice on Windows 9X, for example.")
   (nbuttons)
      Lisp_Object nbuttons;
 {
+  int n;
+
   CHECK_NUMBER (nbuttons, 0);
-  mouse_setup_buttons (XINT (nbuttons));
+  n = XINT (nbuttons);
+  if (n < 2 || n > 3)
+    Fsignal (Qargs_out_of_range,
+            Fcons (build_string ("only 2 or 3 mouse buttons are supported"),
+                   Fcons (nbuttons, Qnil)));
+  mouse_setup_buttons (n);
   return Qnil;
 }
 
@@ -911,6 +918,14 @@ IT_set_face (int face)
       fg = bg;
       bg = tem;
     }
+  /* If the user requested inverse video, obey.  */
+  if (inverse_video)
+    {
+      unsigned long tem2 = fg;
+
+      fg = bg;
+      bg = tem2;
+    }
   if (termscript)
     fprintf (termscript, "<FACE %d%s: %d/%d[FG:%d/BG:%d]>", face,
             highlight ? "H" : "", fp->foreground, fp->background, fg, bg);
@@ -992,6 +1007,9 @@ IT_write_glyphs (struct glyph *str, int str_len)
          register GLYPH g = GLYPH_FROM_CHAR_GLYPH (*str);
          int glyph_not_in_table = 0;
 
+         /* If g is negative, it means we have a multibyte character
+            in *str.  That's what GLYPH_FROM_CHAR_GLYPH returns for
+            multibyte characters.  */
          if (g < 0 || g >= tlen)
            {
              /* This glyph doesn't have an entry in Vglyph_table.  */
@@ -1027,7 +1045,7 @@ IT_write_glyphs (struct glyph *str, int str_len)
 
          /* If the face of this glyph is different from the current
             screen face, update the screen attribute byte.  */
-         cf = FAST_GLYPH_FACE (g);
+         cf = str->face_id;
          if (cf != screen_face)
            IT_set_face (cf);   /* handles invalid faces gracefully */