diff options
| author | Eli Zaretskii | 2013-09-26 10:37:16 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-09-26 10:37:16 +0300 |
| commit | b87c4ff2817e71ca71b028792200b1e069a95e04 (patch) | |
| tree | bfe00c0655fa02078a9ab2c633ea06d90c4a2064 /src/term.c | |
| parent | bbc108377873aa6ed7cf21c731770103096eea39 (diff) | |
| parent | ba355de014b75ed104da4777f909db70d62f2357 (diff) | |
| download | emacs-b87c4ff2817e71ca71b028792200b1e069a95e04.tar.gz emacs-b87c4ff2817e71ca71b028792200b1e069a95e04.zip | |
Merge from trunk.
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/term.c b/src/term.c index 830ecf10dcb..116a2e6bba1 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -1810,27 +1810,10 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str) | |||
| 1810 | static void | 1810 | static void |
| 1811 | produce_glyphless_glyph (struct it *it, Lisp_Object acronym) | 1811 | produce_glyphless_glyph (struct it *it, Lisp_Object acronym) |
| 1812 | { | 1812 | { |
| 1813 | int face_id; | 1813 | int len, face_id = merge_glyphless_glyph_face (it); |
| 1814 | int len; | ||
| 1815 | char buf[sizeof "\\x" + max (6, (sizeof it->c * CHAR_BIT + 3) / 4)]; | 1814 | char buf[sizeof "\\x" + max (6, (sizeof it->c * CHAR_BIT + 3) / 4)]; |
| 1816 | char const *str = " "; | 1815 | char const *str = " "; |
| 1817 | 1816 | ||
| 1818 | /* Get a face ID for the glyph by utilizing a cache (the same way as | ||
| 1819 | done for `escape-glyph' in get_next_display_element). */ | ||
| 1820 | if (it->f == last_glyphless_glyph_frame | ||
| 1821 | && it->face_id == last_glyphless_glyph_face_id) | ||
| 1822 | { | ||
| 1823 | face_id = last_glyphless_glyph_merged_face_id; | ||
| 1824 | } | ||
| 1825 | else | ||
| 1826 | { | ||
| 1827 | /* Merge the `glyphless-char' face into the current face. */ | ||
| 1828 | face_id = merge_faces (it->f, Qglyphless_char, 0, it->face_id); | ||
| 1829 | last_glyphless_glyph_frame = it->f; | ||
| 1830 | last_glyphless_glyph_face_id = it->face_id; | ||
| 1831 | last_glyphless_glyph_merged_face_id = face_id; | ||
| 1832 | } | ||
| 1833 | |||
| 1834 | if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE) | 1817 | if (it->glyphless_method == GLYPHLESS_DISPLAY_THIN_SPACE) |
| 1835 | { | 1818 | { |
| 1836 | /* As there's no way to produce a thin space, we produce a space | 1819 | /* As there's no way to produce a thin space, we produce a space |
| @@ -4061,12 +4044,8 @@ dissociate_if_controlling_tty (int fd) | |||
| 4061 | struct terminal * | 4044 | struct terminal * |
| 4062 | init_tty (const char *name, const char *terminal_type, bool must_succeed) | 4045 | init_tty (const char *name, const char *terminal_type, bool must_succeed) |
| 4063 | { | 4046 | { |
| 4064 | #ifdef TERMINFO | ||
| 4065 | char **address = 0; | ||
| 4066 | #else | ||
| 4067 | char *area; | 4047 | char *area; |
| 4068 | char **address = &area; | 4048 | char **address = &area; |
| 4069 | #endif | ||
| 4070 | int status; | 4049 | int status; |
| 4071 | struct tty_display_info *tty = NULL; | 4050 | struct tty_display_info *tty = NULL; |
| 4072 | struct terminal *terminal = NULL; | 4051 | struct terminal *terminal = NULL; |
| @@ -4157,13 +4136,9 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed) | |||
| 4157 | /* On some systems, tgetent tries to access the controlling | 4136 | /* On some systems, tgetent tries to access the controlling |
| 4158 | terminal. */ | 4137 | terminal. */ |
| 4159 | block_tty_out_signal (); | 4138 | block_tty_out_signal (); |
| 4160 | #ifdef TERMINFO | ||
| 4161 | status = tgetent (0, terminal_type); | ||
| 4162 | #else | ||
| 4163 | status = tgetent (tty->termcap_term_buffer, terminal_type); | 4139 | status = tgetent (tty->termcap_term_buffer, terminal_type); |
| 4164 | if (tty->termcap_term_buffer[TERMCAP_BUFFER_SIZE - 1]) | 4140 | if (tty->termcap_term_buffer[TERMCAP_BUFFER_SIZE - 1]) |
| 4165 | emacs_abort (); | 4141 | emacs_abort (); |
| 4166 | #endif | ||
| 4167 | unblock_tty_out_signal (); | 4142 | unblock_tty_out_signal (); |
| 4168 | 4143 | ||
| 4169 | if (status < 0) | 4144 | if (status < 0) |
| @@ -4194,9 +4169,7 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ | |||
| 4194 | terminal_type); | 4169 | terminal_type); |
| 4195 | } | 4170 | } |
| 4196 | 4171 | ||
| 4197 | #ifndef TERMINFO | ||
| 4198 | area = tty->termcap_strings_buffer; | 4172 | area = tty->termcap_strings_buffer; |
| 4199 | #endif | ||
| 4200 | tty->TS_ins_line = tgetstr ("al", address); | 4173 | tty->TS_ins_line = tgetstr ("al", address); |
| 4201 | tty->TS_ins_multi_lines = tgetstr ("AL", address); | 4174 | tty->TS_ins_multi_lines = tgetstr ("AL", address); |
| 4202 | tty->TS_bell = tgetstr ("bl", address); | 4175 | tty->TS_bell = tgetstr ("bl", address); |