aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-11-12 14:35:43 +0000
committerGerd Moellmann1999-11-12 14:35:43 +0000
commite7f90eab7e2c5d4a86cc5c19f81a890a55107804 (patch)
treef7ab79bda7dc4ba468ee493d7021dfc013499718 /src
parent9b2e6e4cd69c9c830a867f5d76f96897d371e14c (diff)
downloademacs-e7f90eab7e2c5d4a86cc5c19f81a890a55107804.tar.gz
emacs-e7f90eab7e2c5d4a86cc5c19f81a890a55107804.zip
(term_init): If "op" isn't available, don't support color
because we can't switch back to the default foreground and background.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/term.c23
2 files changed, 18 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3e1aca9c656..3b90332764e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
11999-11-12 Gerd Moellmann <gerd@gnu.org> 11999-11-12 Gerd Moellmann <gerd@gnu.org>
2 2
3 * term.c (term_init): If "op" isn't available, don't support color
4 because we can't switch back to the default foreground and
5 background.
6
3 * doc.c (Fdocumentation_property): Remove GCPRO because 7 * doc.c (Fdocumentation_property): Remove GCPRO because
4 Fsubstitute_command_keys gcpro's the string. 8 Fsubstitute_command_keys gcpro's the string.
5 9
diff --git a/src/term.c b/src/term.c
index 80e49028818..fc6fa103187 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2213,18 +2213,23 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
2213 MultiLeft = tgetstr ("LE", address); 2213 MultiLeft = tgetstr ("LE", address);
2214 MultiRight = tgetstr ("RI", address); 2214 MultiRight = tgetstr ("RI", address);
2215 2215
2216 /* SVr4/ANSI color suppert. */ 2216 /* SVr4/ANSI color suppert. If "op" isn't available, don't support
2217 color because we can't switch back to the default foreground and
2218 background. */
2217 TS_orig_pair = tgetstr ("op", address); 2219 TS_orig_pair = tgetstr ("op", address);
2218 TS_set_foreground = tgetstr ("AF", address); 2220 if (TS_orig_pair)
2219 TS_set_background = tgetstr ("AB", address);
2220 if (!TS_set_foreground)
2221 { 2221 {
2222 /* SVr4. */ 2222 TS_set_foreground = tgetstr ("AF", address);
2223 TS_set_foreground = tgetstr ("Sf", address); 2223 TS_set_background = tgetstr ("AB", address);
2224 TS_set_background = tgetstr ("Sb", address); 2224 if (!TS_set_foreground)
2225 {
2226 /* SVr4. */
2227 TS_set_foreground = tgetstr ("Sf", address);
2228 TS_set_background = tgetstr ("Sb", address);
2229 }
2230 TN_max_colors = tgetnum ("Co");
2231 TN_max_pairs = tgetnum ("pa");
2225 } 2232 }
2226 TN_max_colors = tgetnum ("Co");
2227 TN_max_pairs = tgetnum ("pa");
2228 2233
2229 MagicWrap = tgetflag ("xn"); 2234 MagicWrap = tgetflag ("xn");
2230 /* Since we make MagicWrap terminals look like AutoWrap, we need to have 2235 /* Since we make MagicWrap terminals look like AutoWrap, we need to have