diff options
| author | Richard M. Stallman | 2005-06-17 14:08:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-06-17 14:08:58 +0000 |
| commit | 072d84a6c24258f78a772a54cbdfaa96efcca85b (patch) | |
| tree | 1fa8225e98cc2823c3141f9656b499aecf4c574e /src/term.c | |
| parent | dfbfad25bf75a6dea0b831f6e36397c6892e04b0 (diff) | |
| download | emacs-072d84a6c24258f78a772a54cbdfaa96efcca85b.tar.gz emacs-072d84a6c24258f78a772a54cbdfaa96efcca85b.zip | |
(produce_special_glyphs): Use spec_glyph_lookup_face.
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/src/term.c b/src/term.c index 1e1a8674b0c..c0eb7be8d56 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -1857,6 +1857,7 @@ produce_special_glyphs (it, what) | |||
| 1857 | enum display_element_type what; | 1857 | enum display_element_type what; |
| 1858 | { | 1858 | { |
| 1859 | struct it temp_it; | 1859 | struct it temp_it; |
| 1860 | GLYPH glyph; | ||
| 1860 | 1861 | ||
| 1861 | temp_it = *it; | 1862 | temp_it = *it; |
| 1862 | temp_it.dp = NULL; | 1863 | temp_it.dp = NULL; |
| @@ -1872,15 +1873,11 @@ produce_special_glyphs (it, what) | |||
| 1872 | && INTEGERP (DISP_CONTINUE_GLYPH (it->dp)) | 1873 | && INTEGERP (DISP_CONTINUE_GLYPH (it->dp)) |
| 1873 | && GLYPH_CHAR_VALID_P (XINT (DISP_CONTINUE_GLYPH (it->dp)))) | 1874 | && GLYPH_CHAR_VALID_P (XINT (DISP_CONTINUE_GLYPH (it->dp)))) |
| 1874 | { | 1875 | { |
| 1875 | temp_it.c = FAST_GLYPH_CHAR (XINT (DISP_CONTINUE_GLYPH (it->dp))); | 1876 | glyph = XINT (DISP_CONTINUE_GLYPH (it->dp)); |
| 1876 | temp_it.len = CHAR_BYTES (temp_it.c); | 1877 | glyph = spec_glyph_lookup_face (XWINDOW (it->window), glyph); |
| 1877 | } | 1878 | } |
| 1878 | else | 1879 | else |
| 1879 | temp_it.c = '\\'; | 1880 | glyph = '\\'; |
| 1880 | |||
| 1881 | produce_glyphs (&temp_it); | ||
| 1882 | it->pixel_width = temp_it.pixel_width; | ||
| 1883 | it->nglyphs = temp_it.pixel_width; | ||
| 1884 | } | 1881 | } |
| 1885 | else if (what == IT_TRUNCATION) | 1882 | else if (what == IT_TRUNCATION) |
| 1886 | { | 1883 | { |
| @@ -1889,18 +1886,22 @@ produce_special_glyphs (it, what) | |||
| 1889 | && INTEGERP (DISP_TRUNC_GLYPH (it->dp)) | 1886 | && INTEGERP (DISP_TRUNC_GLYPH (it->dp)) |
| 1890 | && GLYPH_CHAR_VALID_P (XINT (DISP_TRUNC_GLYPH (it->dp)))) | 1887 | && GLYPH_CHAR_VALID_P (XINT (DISP_TRUNC_GLYPH (it->dp)))) |
| 1891 | { | 1888 | { |
| 1892 | temp_it.c = FAST_GLYPH_CHAR (XINT (DISP_TRUNC_GLYPH (it->dp))); | 1889 | glyph = XINT (DISP_TRUNC_GLYPH (it->dp)); |
| 1893 | temp_it.len = CHAR_BYTES (temp_it.c); | 1890 | glyph = spec_glyph_lookup_face (XWINDOW (it->window), glyph); |
| 1894 | } | 1891 | } |
| 1895 | else | 1892 | else |
| 1896 | temp_it.c = '$'; | 1893 | glyph = '$'; |
| 1897 | |||
| 1898 | produce_glyphs (&temp_it); | ||
| 1899 | it->pixel_width = temp_it.pixel_width; | ||
| 1900 | it->nglyphs = temp_it.pixel_width; | ||
| 1901 | } | 1894 | } |
| 1902 | else | 1895 | else |
| 1903 | abort (); | 1896 | abort (); |
| 1897 | |||
| 1898 | temp_it.c = FAST_GLYPH_CHAR (glyph); | ||
| 1899 | temp_it.face_id = FAST_GLYPH_FACE (glyph); | ||
| 1900 | temp_it.len = CHAR_BYTES (temp_it.c); | ||
| 1901 | |||
| 1902 | produce_glyphs (&temp_it); | ||
| 1903 | it->pixel_width = temp_it.pixel_width; | ||
| 1904 | it->nglyphs = temp_it.pixel_width; | ||
| 1904 | } | 1905 | } |
| 1905 | 1906 | ||
| 1906 | 1907 | ||
| @@ -1919,7 +1920,8 @@ produce_special_glyphs (it, what) | |||
| 1919 | ? (TN_no_color_video & (ATTR)) == 0 \ | 1920 | ? (TN_no_color_video & (ATTR)) == 0 \ |
| 1920 | : 1) | 1921 | : 1) |
| 1921 | 1922 | ||
| 1922 | /* Turn appearances of face FACE_ID on tty frame F on. */ | 1923 | /* Turn appearances of face FACE_ID on tty frame F on. |
| 1924 | FACE_ID is a realized face ID number, in the face cache. */ | ||
| 1923 | 1925 | ||
| 1924 | static void | 1926 | static void |
| 1925 | turn_on_face (f, face_id) | 1927 | turn_on_face (f, face_id) |
| @@ -2685,6 +2687,16 @@ fatal (str, arg1, arg2) | |||
| 2685 | exit (1); | 2687 | exit (1); |
| 2686 | } | 2688 | } |
| 2687 | 2689 | ||
| 2690 | DEFUN ("tty-no-underline", Ftty_no_underline, Stty_no_underline, 0, 0, 0, | ||
| 2691 | doc: /* Declare that this terminal does not handle underlining. | ||
| 2692 | This is used to override the terminfo data, for certain terminals that | ||
| 2693 | do not really do underlining, but say that they do. */) | ||
| 2694 | () | ||
| 2695 | { | ||
| 2696 | TS_enter_underline_mode = 0; | ||
| 2697 | return Qnil; | ||
| 2698 | } | ||
| 2699 | |||
| 2688 | void | 2700 | void |
| 2689 | syms_of_term () | 2701 | syms_of_term () |
| 2690 | { | 2702 | { |
| @@ -2704,6 +2716,7 @@ The function should accept no arguments. */); | |||
| 2704 | 2716 | ||
| 2705 | defsubr (&Stty_display_color_p); | 2717 | defsubr (&Stty_display_color_p); |
| 2706 | defsubr (&Stty_display_color_cells); | 2718 | defsubr (&Stty_display_color_cells); |
| 2719 | defsubr (&Stty_no_underline); | ||
| 2707 | } | 2720 | } |
| 2708 | 2721 | ||
| 2709 | /* arch-tag: 498e7449-6f2e-45e2-91dd-b7d4ca488193 | 2722 | /* arch-tag: 498e7449-6f2e-45e2-91dd-b7d4ca488193 |