Implement GUI display of R2L lines, fix TTY display of R2L lines.
[bpt/emacs.git] / src / term.c
index eda19d2..bb14320 100644 (file)
@@ -2271,7 +2271,7 @@ set_tty_color_mode (tty, f)
      struct tty_display_info *tty;
      struct frame *f;
 {
-  Lisp_Object tem, val, color_mode_spec;
+  Lisp_Object tem, val;
   Lisp_Object color_mode;
   int mode;
   extern Lisp_Object Qtty_color_mode;
@@ -2283,12 +2283,13 @@ set_tty_color_mode (tty, f)
 
   if (INTEGERP (val))
     color_mode = val;
-  else
+  else if (SYMBOLP (tty_color_mode_alist))
     {
-      tem = (NILP (tty_color_mode_alist) ? Qnil
-            : Fassq (val, XSYMBOL (tty_color_mode_alist)->value));
+      tem = Fassq (val, Fsymbol_value (tty_color_mode_alist));
       color_mode = CONSP (tem) ? XCDR (tem) : Qnil;
     }
+  else
+    color_mode = Qnil;
 
   mode = INTEGERP (color_mode) ? XINT (color_mode) : 0;
 
@@ -3620,25 +3621,18 @@ init_tty (char *name, char *terminal_type, int must_succeed)
     }
   if (status == 0)
     {
-#ifdef TERMINFO
       maybe_fatal (must_succeed, terminal,
                    "Terminal type %s is not defined",
                    "Terminal type %s is not defined.\n\
 If that is not the actual type of terminal you have,\n\
 use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
-`setenv TERM ...') to specify the correct type.  It may be necessary\n\
-to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.",
-                   terminal_type);
+`setenv TERM ...') to specify the correct type.  It may be necessary\n"
+#ifdef TERMINFO
+"to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.",
 #else
-      maybe_fatal (must_succeed, terminal,
-                   "Terminal type %s is not defined",
-                   "Terminal type %s is not defined.\n\
-If that is not the actual type of terminal you have,\n\
-use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
-`setenv TERM ...') to specify the correct type.  It may be necessary\n\
-to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
-                   terminal_type);
+"to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
 #endif
+                   terminal_type);
     }
 
 #ifndef TERMINFO
@@ -3905,20 +3899,15 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
     {
       maybe_fatal (must_succeed, terminal,
                    "Terminal type \"%s\" is not powerful enough to run Emacs",
-# ifdef TERMINFO
                    "Terminal type \"%s\" is not powerful enough to run Emacs.\n\
 It lacks the ability to position the cursor.\n\
 If that is not the actual type of terminal you have,\n\
 use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
-`setenv TERM ...') to specify the correct type.  It may be necessary\n\
-to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.",
+`setenv TERM ...') to specify the correct type.  It may be necessary\n"
+# ifdef TERMINFO
+"to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.",
 # else /* TERMCAP */
-                   "Terminal type \"%s\" is not powerful enough to run Emacs.\n\
-It lacks the ability to position the cursor.\n\
-If that is not the actual type of terminal you have,\n\
-use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
-`setenv TERM ...') to specify the correct type.  It may be necessary\n\
-to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
+"to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
 # endif /* TERMINFO */
                    terminal_type);
     }