changeset 83472:b8bd59a73456

Fix tty state problem after error in `set-quit-char'. * src/keyboard.c (Fset_quit_char): Don't leave tty state uninitialized after an error. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-512
author Karoly Lorentey <lorentey@elte.hu>
date Tue, 14 Feb 2006 12:32:39 +0000
parents 08b49bab776b
children 428d132b4028
files README.multi-tty src/keyboard.c
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/README.multi-tty	Mon Feb 13 14:38:07 2006 +0000
+++ b/README.multi-tty	Tue Feb 14 12:32:39 2006 +0000
@@ -402,9 +402,9 @@
 THINGS TO DO
 ------------
 
-** emacsclient -t on the console does not work after sudo:
+** emacsclient -t on the console does not work after su:
 
-	# sudo lorentey
+	# su lorentey
 	$ emacsclient -t
 	*ERROR*: Could not open file: /dev/tty1
 
--- a/src/keyboard.c	Mon Feb 13 14:38:07 2006 +0000
+++ b/src/keyboard.c	Tue Feb 14 12:32:39 2006 +0000
@@ -10909,14 +10909,14 @@
     return Qnil;
   tty = t->display_info.tty;
 
+  if (NILP (quit) || !INTEGERP (quit) || XINT (quit) < 0 || XINT (quit) > 0400)
+    error ("QUIT must be an ASCII character");
+
 #ifndef DOS_NT
   /* this causes startup screen to be restored and messes with the mouse */
   reset_sys_modes (tty);
 #endif
   
-  if (NILP (quit) || !INTEGERP (quit) || XINT (quit) < 0 || XINT (quit) > 0400)
-    error ("QUIT must be an ASCII character");
-
   /* Don't let this value be out of range.  */
   quit_char = XINT (quit) & (tty->meta_key == 0 ? 0177 : 0377);