Mercurial > emacs
comparison src/term.c @ 83311:c016d82bf02b
Merged from miles@gnu.org--gnu-2005 (patch 423-434)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-423
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-424
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-425
Remove "-face" suffix from gnus faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-426
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-427
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-428
Remove "-face" suffix from MH-E faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-429
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-430
Remove "-face" suffix from cc-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-431
Remove "-face" suffix from eshell faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-432
Remove "-face" suffix from ediff faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-433
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-434
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-351
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Tue, 21 Jun 2005 15:42:45 +0000 |
parents | 4a6a96fe8480 bda22724fc82 |
children | 13371344a3ba |
comparison
equal
deleted
inserted
replaced
83310:e58cb448e07c | 83311:c016d82bf02b |
---|---|
1693 produce_special_glyphs (it, what) | 1693 produce_special_glyphs (it, what) |
1694 struct it *it; | 1694 struct it *it; |
1695 enum display_element_type what; | 1695 enum display_element_type what; |
1696 { | 1696 { |
1697 struct it temp_it; | 1697 struct it temp_it; |
1698 GLYPH glyph; | |
1698 | 1699 |
1699 temp_it = *it; | 1700 temp_it = *it; |
1700 temp_it.dp = NULL; | 1701 temp_it.dp = NULL; |
1701 temp_it.what = IT_CHARACTER; | 1702 temp_it.what = IT_CHARACTER; |
1702 temp_it.len = 1; | 1703 temp_it.len = 1; |
1708 /* Continuation glyph. */ | 1709 /* Continuation glyph. */ |
1709 if (it->dp | 1710 if (it->dp |
1710 && INTEGERP (DISP_CONTINUE_GLYPH (it->dp)) | 1711 && INTEGERP (DISP_CONTINUE_GLYPH (it->dp)) |
1711 && GLYPH_CHAR_VALID_P (XINT (DISP_CONTINUE_GLYPH (it->dp)))) | 1712 && GLYPH_CHAR_VALID_P (XINT (DISP_CONTINUE_GLYPH (it->dp)))) |
1712 { | 1713 { |
1713 temp_it.c = FAST_GLYPH_CHAR (XINT (DISP_CONTINUE_GLYPH (it->dp))); | 1714 glyph = XINT (DISP_CONTINUE_GLYPH (it->dp)); |
1714 temp_it.len = CHAR_BYTES (temp_it.c); | 1715 glyph = spec_glyph_lookup_face (XWINDOW (it->window), glyph); |
1715 } | 1716 } |
1716 else | 1717 else |
1717 temp_it.c = '\\'; | 1718 glyph = '\\'; |
1718 | |
1719 produce_glyphs (&temp_it); | |
1720 it->pixel_width = temp_it.pixel_width; | |
1721 it->nglyphs = temp_it.pixel_width; | |
1722 } | 1719 } |
1723 else if (what == IT_TRUNCATION) | 1720 else if (what == IT_TRUNCATION) |
1724 { | 1721 { |
1725 /* Truncation glyph. */ | 1722 /* Truncation glyph. */ |
1726 if (it->dp | 1723 if (it->dp |
1727 && INTEGERP (DISP_TRUNC_GLYPH (it->dp)) | 1724 && INTEGERP (DISP_TRUNC_GLYPH (it->dp)) |
1728 && GLYPH_CHAR_VALID_P (XINT (DISP_TRUNC_GLYPH (it->dp)))) | 1725 && GLYPH_CHAR_VALID_P (XINT (DISP_TRUNC_GLYPH (it->dp)))) |
1729 { | 1726 { |
1730 temp_it.c = FAST_GLYPH_CHAR (XINT (DISP_TRUNC_GLYPH (it->dp))); | 1727 glyph = XINT (DISP_TRUNC_GLYPH (it->dp)); |
1731 temp_it.len = CHAR_BYTES (temp_it.c); | 1728 glyph = spec_glyph_lookup_face (XWINDOW (it->window), glyph); |
1732 } | 1729 } |
1733 else | 1730 else |
1734 temp_it.c = '$'; | 1731 glyph = '$'; |
1735 | |
1736 produce_glyphs (&temp_it); | |
1737 it->pixel_width = temp_it.pixel_width; | |
1738 it->nglyphs = temp_it.pixel_width; | |
1739 } | 1732 } |
1740 else | 1733 else |
1741 abort (); | 1734 abort (); |
1735 | |
1736 temp_it.c = FAST_GLYPH_CHAR (glyph); | |
1737 temp_it.face_id = FAST_GLYPH_FACE (glyph); | |
1738 temp_it.len = CHAR_BYTES (temp_it.c); | |
1739 | |
1740 produce_glyphs (&temp_it); | |
1741 it->pixel_width = temp_it.pixel_width; | |
1742 it->nglyphs = temp_it.pixel_width; | |
1742 } | 1743 } |
1743 | 1744 |
1744 | 1745 |
1745 | 1746 |
1746 /*********************************************************************** | 1747 /*********************************************************************** |
1755 #define MAY_USE_WITH_COLORS_P(tty, ATTR) \ | 1756 #define MAY_USE_WITH_COLORS_P(tty, ATTR) \ |
1756 (tty->TN_max_colors > 0 \ | 1757 (tty->TN_max_colors > 0 \ |
1757 ? (tty->TN_no_color_video & (ATTR)) == 0 \ | 1758 ? (tty->TN_no_color_video & (ATTR)) == 0 \ |
1758 : 1) | 1759 : 1) |
1759 | 1760 |
1760 /* Turn appearances of face FACE_ID on tty frame F on. */ | 1761 /* Turn appearances of face FACE_ID on tty frame F on. |
1762 FACE_ID is a realized face ID number, in the face cache. */ | |
1761 | 1763 |
1762 static void | 1764 static void |
1763 turn_on_face (f, face_id) | 1765 turn_on_face (f, face_id) |
1764 struct frame *f; | 1766 struct frame *f; |
1765 int face_id; | 1767 int face_id; |
2193 | 2195 |
2194 DEFUN ("display-name", Fdisplay_name, Sdisplay_name, 0, 1, 0, | 2196 DEFUN ("display-name", Fdisplay_name, Sdisplay_name, 0, 1, 0, |
2195 doc: /* Return the name of the device that DISPLAY uses. | 2197 doc: /* Return the name of the device that DISPLAY uses. |
2196 It is not guaranteed that the returned value is unique among opened displays. | 2198 It is not guaranteed that the returned value is unique among opened displays. |
2197 | 2199 |
2198 DISPLAY can be a display, a frame, or nil (meaning the selected | 2200 DISPLAY may be a display, a frame, or nil (meaning the selected |
2199 frame's display). */) | 2201 frame's display). */) |
2200 (display) | 2202 (display) |
2201 Lisp_Object display; | 2203 Lisp_Object display; |
2202 { | 2204 { |
2203 struct display *d = get_display (display, 1); | 2205 struct display *d = get_display (display, 1); |
2207 else | 2209 else |
2208 return Qnil; | 2210 return Qnil; |
2209 } | 2211 } |
2210 | 2212 |
2211 DEFUN ("display-tty-type", Fdisplay_tty_type, Sdisplay_tty_type, 0, 1, 0, | 2213 DEFUN ("display-tty-type", Fdisplay_tty_type, Sdisplay_tty_type, 0, 1, 0, |
2212 doc: /* Return the type of the TTY device that DISPLAY uses. */) | 2214 doc: /* Return the type of the TTY device that DISPLAY uses. |
2215 | |
2216 DISPLAY may be a display, a frame, or nil (meaning the selected | |
2217 frame's display). */) | |
2213 (display) | 2218 (display) |
2214 Lisp_Object display; | 2219 Lisp_Object display; |
2215 { | 2220 { |
2216 struct display *d = get_display (display, 1); | 2221 struct display *d = get_display (display, 1); |
2217 | 2222 |
2223 else | 2228 else |
2224 return Qnil; | 2229 return Qnil; |
2225 } | 2230 } |
2226 | 2231 |
2227 DEFUN ("display-controlling-tty-p", Fdisplay_controlling_tty_p, Sdisplay_controlling_tty_p, 0, 1, 0, | 2232 DEFUN ("display-controlling-tty-p", Fdisplay_controlling_tty_p, Sdisplay_controlling_tty_p, 0, 1, 0, |
2228 doc: /* Return non-nil if DISPLAY is on the controlling tty of the Emacs process. */) | 2233 doc: /* Return non-nil if DISPLAY is on the controlling tty of the Emacs process. |
2234 | |
2235 DISPLAY may be a display, a frame, or nil (meaning the selected | |
2236 frame's display). */) | |
2229 (display) | 2237 (display) |
2230 Lisp_Object display; | 2238 Lisp_Object display; |
2231 { | 2239 { |
2232 struct display *d = get_display (display, 1); | 2240 struct display *d = get_display (display, 1); |
2233 | 2241 |
2234 if (d->type != output_termcap || d->display_info.tty->name) | 2242 if (d->type != output_termcap || d->display_info.tty->name) |
2235 return Qnil; | 2243 return Qnil; |
2236 else | 2244 else |
2237 return Qt; | 2245 return Qt; |
2238 } | 2246 } |
2247 | |
2248 DEFUN ("tty-no-underline", Ftty_no_underline, Stty_no_underline, 0, 1, 0, | |
2249 doc: /* Declare that the tty used by DISPLAY does not handle underlining. | |
2250 This is used to override the terminfo data, for certain terminals that | |
2251 do not really do underlining, but say that they do. This function has | |
2252 no effect if used on a non-tty display. | |
2253 | |
2254 DISPLAY may be a display, a frame, or nil (meaning the selected | |
2255 frame's display). */) | |
2256 (display) | |
2257 Lisp_Object display; | |
2258 { | |
2259 struct display *d = get_display (display, 1); | |
2260 | |
2261 if (d->type == output_termcap) | |
2262 d->display_info.tty->TS_enter_underline_mode = 0; | |
2263 return Qnil; | |
2264 } | |
2265 | |
2239 | 2266 |
2240 | 2267 |
2241 /*********************************************************************** | 2268 /*********************************************************************** |
2242 Initialization | 2269 Initialization |
2243 ***********************************************************************/ | 2270 ***********************************************************************/ |
3382 See `resume-tty'. */); | 3409 See `resume-tty'. */); |
3383 Vresume_tty_functions = Qnil; | 3410 Vresume_tty_functions = Qnil; |
3384 | 3411 |
3385 defsubr (&Stty_display_color_p); | 3412 defsubr (&Stty_display_color_p); |
3386 defsubr (&Stty_display_color_cells); | 3413 defsubr (&Stty_display_color_cells); |
3414 defsubr (&Stty_no_underline); | |
3387 defsubr (&Sdisplay_name); | 3415 defsubr (&Sdisplay_name); |
3388 defsubr (&Sdisplay_tty_type); | 3416 defsubr (&Sdisplay_tty_type); |
3389 defsubr (&Sdisplay_controlling_tty_p); | 3417 defsubr (&Sdisplay_controlling_tty_p); |
3390 defsubr (&Sdelete_display); | 3418 defsubr (&Sdelete_display); |
3391 defsubr (&Sdisplay_live_p); | 3419 defsubr (&Sdisplay_live_p); |