aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2005-12-12 02:37:01 +0000
committerKaroly Lorentey2005-12-12 02:37:01 +0000
commitd68058039e1ff5635b2e44509fc242de4f0a286f (patch)
tree407ca738e65d6bd9a7d37305c7cff86961de95ea
parentbe3d2d66d2dff979604134c5dc5fb506ded4aa54 (diff)
downloademacs-d68058039e1ff5635b2e44509fc242de4f0a286f.tar.gz
emacs-d68058039e1ff5635b2e44509fc242de4f0a286f.zip
Fix "first non-ASCII character on new tty frames" problem.
* src/keyboard.c (kbd_buffer_store_event_hold): Simplify condition. (read_key_sequence): Reinitialize fkey and keytran at each replay. * src/coding.c (Fkeyboard_coding_system): Update doc. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-449
-rw-r--r--README.multi-tty24
-rw-r--r--src/coding.c4
-rw-r--r--src/keyboard.c22
3 files changed, 33 insertions, 17 deletions
diff --git a/README.multi-tty b/README.multi-tty
index ab43fc7c4e1..3f873facaec 100644
--- a/README.multi-tty
+++ b/README.multi-tty
@@ -31,9 +31,11 @@ The following is a (sadly incomplete) list of people who have
31contributed to the project by testing, submitting patches, bug 31contributed to the project by testing, submitting patches, bug
32reports, and suggestions. Thanks! 32reports, and suggestions. Thanks!
33 33
34Bernard Adrian <bernadrian@free.fr>
34ARISAWA Akihiro <ari@mbf.ocn.ne.jp> 35ARISAWA Akihiro <ari@mbf.ocn.ne.jp>
35Vincent Bernat <bernat@luffy.cx> 36Vincent Bernat <bernat@luffy.cx>
36Han Boetes <han@mijncomputer.nl> 37Han Boetes <han@mijncomputer.nl>
38Damien Cassou <damien.cassou@laposte.net>
37Robert J. Chassell <bob@rattlesnake.com> 39Robert J. Chassell <bob@rattlesnake.com>
38Romain Francoise <romain@orebokech.com> 40Romain Francoise <romain@orebokech.com>
39Ami Fischman <ami@fischman.org> 41Ami Fischman <ami@fischman.org>
@@ -191,8 +193,8 @@ If you run Debian, or a distribution based on Debian, you are welcome
191to use our binary packages; put these lines in your /etc/apt/sources.list: 193to use our binary packages; put these lines in your /etc/apt/sources.list:
192 194
193 # Multi-tty Emacs 195 # Multi-tty Emacs
194 deb http://aszt.inf.elte.hu/~lorentey/mirror/apt ./ 196 deb http://aszt.inf.elte.hu/~lorentey/mirror/apt unstable multi-tty
195 deb-src http://aszt.inf.elte.hu/~lorentey/mirror/apt ./ 197 deb-src http://aszt.inf.elte.hu/~lorentey/mirror/apt unstable multi-tty
196 198
197Note that these packages are intended solely to provide an easy way to 199Note that these packages are intended solely to provide an easy way to
198test the new multi-tty features. They are not to be taken as Emacs 200test the new multi-tty features. They are not to be taken as Emacs
@@ -208,7 +210,7 @@ The multi-tty branch is compiled the same way as Emacs itself:
208 210
209 make maintainer-clean # (If you have compiled Emacs before) 211 make maintainer-clean # (If you have compiled Emacs before)
210 212
211 ./configure <your favourite options> 213 ./configure --without-gtk <your favourite options>
212 make bootstrap 214 make bootstrap
213 make install 215 make install
214 216
@@ -391,6 +393,8 @@ THINGS TO DO
391** Report GTK multi-display problems to GTK maintainers. For extra 393** Report GTK multi-display problems to GTK maintainers. For extra
392 credit, fix them. 394 credit, fix them.
393 395
396** Disable connecting to a new X display when we use the GTK toolkit.
397
394** Possibly turn off the double C-g feature when there is an X frame. 398** Possibly turn off the double C-g feature when there is an X frame.
395 C.f. (emacs)Emergency Escape. 399 C.f. (emacs)Emergency Escape.
396 400
@@ -564,7 +568,7 @@ THINGS TO DO
564** Dan Nicolaescu suggests that -nw should be added as an alias for -t 568** Dan Nicolaescu suggests that -nw should be added as an alias for -t
565 in emacsclient. Good idea. (Alas, implementing this is not 569 in emacsclient. Good idea. (Alas, implementing this is not
566 trivial, getopt_long does not seem to support two-letter ``short'' 570 trivial, getopt_long does not seem to support two-letter ``short''
567 options. Patches are welcome.) :-) 571 options. Patches are welcome.)
568 572
569** Mark Plaksin suggests that emacsclient should accept the same 573** Mark Plaksin suggests that emacsclient should accept the same
570 X-related command-line arguments as Emacs. Most of the X-related 574 X-related command-line arguments as Emacs. Most of the X-related
@@ -608,6 +612,8 @@ THINGS TO DO
608 useful. (Update: Look again. X unconditionally enables this, maybe 612 useful. (Update: Look again. X unconditionally enables this, maybe
609 that's why raw terminal support is broken again. I really do need 613 that's why raw terminal support is broken again. I really do need
610 to understand input.) 614 to understand input.)
615 (Update: I am starting to understand the read_key_sequence->read-char
616 ->kbd_buffer_get_event->read_avail_input->read_socket_hook path. Yay!)
611 617
612** flow-ctrl.el must be updated. 618** flow-ctrl.el must be updated.
613 619
@@ -914,7 +920,7 @@ DIARY OF CHANGES
914 frame that is dumped with Emacs. Checking for this frame (e.g. in 920 frame that is dumped with Emacs. Checking for this frame (e.g. in
915 cmd_error_internal) is ugly. 921 cmd_error_internal) is ugly.
916 922
917 (Done, broking interactive temacs.) 923 (Done, breaking interactive temacs.)
918 924
919-- The command `emacsclient -t -e '(delete-frame)'' fails to exit. 925-- The command `emacsclient -t -e '(delete-frame)'' fails to exit.
920 926
@@ -1264,7 +1270,13 @@ DIARY OF CHANGES
1264 it is not recognized correctly. May be related to the bug below. 1270 it is not recognized correctly. May be related to the bug below.
1265 1271
1266 (Seems to have been fixed as a side effect of patch-434. "The bug 1272 (Seems to have been fixed as a side effect of patch-434. "The bug
1267 below" was the set-input-mode madness.) 1273 below" was the set-input-mode madness.)
1274
1275 (Update: this bug was fixed for good in patch-449. It was tracked
1276 down to a bug in `read_key_sequence': it failed to reinitialize its
1277 local function-key-map/key-translation-map references when it
1278 switched keyboards. I don't understand why did this bug only
1279 appear on brand new frames, though!)
1268 1280
1269;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d 1281;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d
1270 1282
diff --git a/src/coding.c b/src/coding.c
index 5658a8ab09a..d032f8c9483 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -7411,7 +7411,9 @@ DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_intern
7411 7411
7412DEFUN ("keyboard-coding-system", Fkeyboard_coding_system, 7412DEFUN ("keyboard-coding-system", Fkeyboard_coding_system,
7413 Skeyboard_coding_system, 0, 1, 0, 7413 Skeyboard_coding_system, 0, 1, 0,
7414 doc: /* Return coding system specified for decoding keyboard input. */) 7414 doc: /* Return coding system for decoding keyboard input on DEVICE.
7415DEVICE may be a display device id, a frame, or nil for the selected
7416frame's display device. */)
7415 (device) 7417 (device)
7416 Lisp_Object device; 7418 Lisp_Object device;
7417{ 7419{
diff --git a/src/keyboard.c b/src/keyboard.c
index 51b59432214..4bc426222f0 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2662,6 +2662,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
2662 2662
2663 if (_setjmp (local_getcjmp)) 2663 if (_setjmp (local_getcjmp))
2664 { 2664 {
2665 /* Handle quits while reading the keyboard. */
2665 /* We must have saved the outer value of getcjmp here, 2666 /* We must have saved the outer value of getcjmp here,
2666 so restore it now. */ 2667 so restore it now. */
2667 restore_getcjmp (save_jump); 2668 restore_getcjmp (save_jump);
@@ -3690,12 +3691,10 @@ kbd_buffer_store_event_hold (event, hold_quit)
3690 if (c == quit_char) 3691 if (c == quit_char)
3691 { 3692 {
3692#ifdef MULTI_KBOARD 3693#ifdef MULTI_KBOARD
3693 KBOARD *kb; 3694 KBOARD *kb = FRAME_KBOARD (XFRAME (event->frame_or_window));
3694 struct input_event *sp; 3695 struct input_event *sp;
3695 3696
3696 if (single_kboard 3697 if (single_kboard && kb != current_kboard)
3697 && (kb = FRAME_KBOARD (XFRAME (event->frame_or_window)),
3698 kb != current_kboard))
3699 { 3698 {
3700 kb->kbd_queue 3699 kb->kbd_queue
3701 = Fcons (make_lispy_switch_frame (event->frame_or_window), 3700 = Fcons (make_lispy_switch_frame (event->frame_or_window),
@@ -8742,12 +8741,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
8742 last_nonmenu_event = Qnil; 8741 last_nonmenu_event = Qnil;
8743 8742
8744 delayed_switch_frame = Qnil; 8743 delayed_switch_frame = Qnil;
8745 fkey.map = fkey.parent = current_kboard->Vlocal_function_key_map; 8744
8746 keytran.map = keytran.parent = current_kboard->Vlocal_key_translation_map;
8747 /* If there is no translation-map, turn off scanning. */
8748 fkey.start = fkey.end = KEYMAPP (fkey.map) ? 0 : bufsize + 1;
8749 keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1;
8750
8751 if (INTERACTIVE) 8745 if (INTERACTIVE)
8752 { 8746 {
8753 if (!NILP (prompt)) 8747 if (!NILP (prompt))
@@ -8787,6 +8781,14 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
8787 keybuf[0..mock_input] holds the sequence we should reread. */ 8781 keybuf[0..mock_input] holds the sequence we should reread. */
8788 replay_sequence: 8782 replay_sequence:
8789 8783
8784 /* We may switch keyboards between rescans, so we need to
8785 reinitialize fkey and keytran before each replay. */
8786 fkey.map = fkey.parent = current_kboard->Vlocal_function_key_map;
8787 keytran.map = keytran.parent = current_kboard->Vlocal_key_translation_map;
8788 /* If there is no translation map, turn off scanning. */
8789 fkey.start = fkey.end = KEYMAPP (fkey.map) ? 0 : bufsize + 1;
8790 keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1;
8791
8790 starting_buffer = current_buffer; 8792 starting_buffer = current_buffer;
8791 first_unbound = bufsize + 1; 8793 first_unbound = bufsize + 1;
8792 8794