]> code.delx.au - gnu-emacs/blobdiff - src/term.c
Replace eldoc-documentation-function with a hook
[gnu-emacs] / src / term.c
index a77e5729b5b1ef5dddf5c6658a257ef261220d05..81908b370a5dc8a53af9626a461a1f09eed7657f 100644 (file)
@@ -548,8 +548,8 @@ encode_terminal_code (struct glyph *src, int src_len,
     {
       if (src->type == COMPOSITE_GLYPH)
        {
-         struct composition *cmp IF_LINT (= NULL);
-         Lisp_Object gstring IF_LINT (= Qnil);
+         struct composition *cmp UNINIT;
+         Lisp_Object gstring UNINIT;
          int i;
 
          nbytes = buf - encode_terminal_src;
@@ -614,7 +614,7 @@ encode_terminal_code (struct glyph *src, int src_len,
       else if (! CHAR_GLYPH_PADDING_P (*src))
        {
          GLYPH g;
-         int c IF_LINT (= 0);
+         int c UNINIT;
          Lisp_Object string;
 
          string = Qnil;
@@ -1496,6 +1496,8 @@ append_glyph (struct it *it)
       glyph->pixel_width = 1;
       glyph->u.ch = it->char_to_display;
       glyph->face_id = it->face_id;
+      glyph->avoid_cursor_p = it->avoid_cursor_p;
+      glyph->multibyte_p = it->multibyte_p;
       glyph->padding_p = i > 0;
       glyph->charpos = CHARPOS (it->position);
       glyph->object = it->object;
@@ -1676,6 +1678,7 @@ append_composite_glyph (struct it *it)
          glyph = it->glyph_row->glyphs[it->area];
        }
       glyph->type = COMPOSITE_GLYPH;
+      eassert (it->pixel_width <= SHRT_MAX);
       glyph->pixel_width = it->pixel_width;
       glyph->u.cmp.id = it->cmp_it.id;
       if (it->cmp_it.ch < 0)
@@ -1691,8 +1694,10 @@ append_composite_glyph (struct it *it)
          glyph->slice.cmp.to = it->cmp_it.to - 1;
        }
 
+      glyph->avoid_cursor_p = it->avoid_cursor_p;
+      glyph->multibyte_p = it->multibyte_p;
       glyph->face_id = it->face_id;
-      glyph->padding_p = 0;
+      glyph->padding_p = false;
       glyph->charpos = CHARPOS (it->position);
       glyph->object = it->object;
       if (it->bidi_p)
@@ -1775,8 +1780,10 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str)
     return;
   glyph->type = CHAR_GLYPH;
   glyph->pixel_width = 1;
+  glyph->avoid_cursor_p = it->avoid_cursor_p;
+  glyph->multibyte_p = it->multibyte_p;
   glyph->face_id = face_id;
-  glyph->padding_p = 0;
+  glyph->padding_p = false;
   glyph->charpos = CHARPOS (it->position);
   glyph->object = it->object;
   if (it->bidi_p)
@@ -1953,8 +1960,6 @@ turn_off_face (struct frame *f, int face_id)
   struct face *face = FACE_FROM_ID (f, face_id);
   struct tty_display_info *tty = FRAME_TTY (f);
 
-  eassert (face != NULL);
-
   if (tty->TS_exit_attribute_mode)
     {
       /* Capability "me" will turn off appearance modes double-bright,
@@ -3100,7 +3105,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
   struct tty_menu_state *state;
   int statecount, x, y, i;
   bool leave, onepane;
-  int result IF_LINT (= 0);
+  int result UNINIT;
   int title_faces[4];          /* Face to display the menu title.  */
   int faces[4], buffers_num_deleted = 0;
   struct frame *sf = SELECTED_FRAME ();
@@ -3914,13 +3919,15 @@ dissociate_if_controlling_tty (int fd)
 struct terminal *
 init_tty (const char *name, const char *terminal_type, bool must_succeed)
 {
+  struct tty_display_info *tty = NULL;
+  struct terminal *terminal = NULL;
+#ifndef DOS_NT
   char *area;
   char **address = &area;
   int status;
-  struct tty_display_info *tty = NULL;
-  struct terminal *terminal = NULL;
   sigset_t oldset;
   bool ctty = false;  /* True if asked to open controlling tty.  */
+#endif
 
   if (!terminal_type)
     maybe_fatal (must_succeed, 0,
@@ -3929,8 +3936,10 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed)
 
   if (name == NULL)
     name = DEV_TTY;
+#ifndef DOS_NT
   if (!strcmp (name, DEV_TTY))
     ctty = 1;
+#endif
 
   /* If we already have a terminal on the given device, use that.  If
      all such terminals are suspended, create a new one instead.  */